from collections import Counter

N = int(eval(input()))

S = [eval(input()) for _ in range(N)]

c = Counter(S)

max_times = max(c.values())

keys = [key for key, value in list(c.items()) if value == max_times]

# print('keys', keys)

keys = sorted(keys)

print(('\n'.join(keys)))

from collections import Counter

N = int(eval(input()))

C = Counter([eval(input()) for _ in range(N)])

# print(f'{list(C)=}')



max_value = max([value for value in list(C.values())])

# print(f'{max_value=}')



S = [key for key, value in zip(list(C.keys()), list(C.values())) if value == max_value]

# print(f'{S=}')



for s in sorted(S):

    print(s)

from collections import Counter

N = int(eval(input()))
S = [eval(input()) for _ in range(N)]
c = Counter(S)
max_times = max(c.values())
keys = [key for key, value in list(c.items()) if value == max_times]
# print('keys', keys)
keys = sorted(keys)
print(("\n".join(keys)))

from collections import Counter

N = int(eval(input()))
C = Counter([eval(input()) for _ in range(N)])
# print(f'{list(C)=}')
max_value = max([value for value in list(C.values())])
# print(f'{max_value=}')
S = [key for key, value in zip(list(C.keys()), list(C.values())) if value == max_value]
# print(f'{S=}')
for s in sorted(S):
    print(s)

-S = [eval(input()) for _ in range(N)] -c = Counter(S) -max_times = max(c.values()) -keys = [key for key, value in list(c.items()) if value == max_times] -# print('keys', keys) -keys = sorted(keys) -print(("\n".join(keys))) +C = Counter([eval(input()) for _ in range(N)]) +# print(f'{list(C)=}') +max_value = max([value for value in list(C.values())]) +# print(f'{max_value=}') +S = [key for key, value in zip(list(C.keys()), list(C.values())) if value == max_value] +# print(f'{S=}') +for s in sorted(S): +    print(s)