from collections import Counter



N = int(eval(input()))

S = []

for _ in range(N):

    S.append(eval(input()))



counter = Counter(S)



max_val = max(counter.values())

ans = []

for key, value in list(counter.items()):

    if value == max_val:

        ans.append(key)



ans = sorted(ans)



for s in ans:

    print(s)

from collections import Counter



N = int(eval(input()))

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



counter = Counter(S)

maxv = max(counter.values())

ans = []

for k, v in list(counter.items()):

    if v == maxv:

        ans.append(k)



ans.sort()



for s in ans:

    print(s)

from collections import Counter

N = int(eval(input()))
S = []
for _ in range(N):
    S.append(eval(input()))
counter = Counter(S)
max_val = max(counter.values())
ans = []
for key, value in list(counter.items()):
    if value == max_val:
        ans.append(key)
ans = sorted(ans)
for s in ans:
    print(s)

from collections import Counter

N = int(eval(input()))
S = [eval(input()) for _ in range(N)]
counter = Counter(S)
maxv = max(counter.values())
ans = []
for k, v in list(counter.items()):
    if v == maxv:
        ans.append(k)
ans.sort()
for s in ans:
    print(s)

-S = [] -for _ in range(N): -    S.append(eval(input())) +S = [eval(input()) for _ in range(N)] -max_val = max(counter.values()) +maxv = max(counter.values()) -for key, value in list(counter.items()): -    if value == max_val: -        ans.append(key) -ans = sorted(ans) +for k, v in list(counter.items()): +    if v == maxv: +        ans.append(k) +ans.sort()