from collections import defaultdict

s = input()
s = s.lower()

alphabet = defaultdict(int)
for word in s:
    alphabet[word] += 1

result = []
maxCount = max(alphabet.values())
for word, count in alphabet.items():
    if maxCount == count:
        result.append(word)

if len(result) == 1:
    print(result[0].upper())
else:
    print("?")
261cec3b1e4b7a2e2aaf086483574ea9c57dba6f
<mask token>

<mask token>
for word in s:
    alphabet[word] += 1
<mask token>
for word, count in alphabet.items():
    if maxCount == count:
        result.append(word)
if len(result) == 1:
    print(result[0].upper())
else:
    print('?')

<mask token>
s = input()
s = s.lower()
alphabet = defaultdict(int)
for word in s:
    alphabet[word] += 1
result = []
maxCount = max(alphabet.values())
for word, count in alphabet.items():
    if maxCount == count:
        result.append(word)
if len(result) == 1:
    print(result[0].upper())
else:
    print('?')

from collections import defaultdict
s = input()
s = s.lower()
alphabet = defaultdict(int)
for word in s:
    alphabet[word] += 1
result = []
maxCount = max(alphabet.values())
for word, count in alphabet.items():
    if maxCount == count:
        result.append(word)
if len(result) == 1:
    print(result[0].upper())
else:
    print('?')

from collections import defaultdict

s = input()
s = s.lower()

alphabet = defaultdict(int)
for word in s:
    alphabet[word] += 1

result = []
maxCount = max(alphabet.values())
for word, count in alphabet.items():
    if maxCount == count:
        result.append(word)

if len(result) == 1:
    print(result[0].upper())
else:
    print("?")