word = list(input().upper())
what_word = list(set(word))
count_word = []
for i in what_word:
count = word.count(i)
count_word.append(count)
if count_word.count(max(count_word))>=2:
print('?')
else:
print(what_word[count_word.index(max(count_word))])
dictionary로 풀려고했는데, 그러면 count랑 index를 못써서 풀 수가 없었다.
list.count(i): list에 i가 몇개있는지 세어준다.
list.append(i): list에 i를 더해준다.
list.index(i): list에서 i의 위치를 찾는다.