from collections import Counter
def get_max_char(str):
count = Counter(str)
count_list = list(count.values())
max_value = max(count_list)
max_list = []
for k, v in count.items():
if v == max_value:
max_list.append(k)
return max_list
str1 = input()
print(get_max_char(str1))