from collections import Counter



N = int(eval(input()))

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

cnt = Counter(l)

M = max(list(cnt.values()))

ans = []



for k in list(cnt.keys()):

    if cnt[k]==M:

        ans.append(k)



ans.sort()



for ans_i in ans:

    print(ans_i)
from collections import Counter



N = int(eval(input()))

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

cnt = Counter(S)

M = max(list(cnt.values()))

ans = []



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

    if v==M:

        ans.append(k)



ans.sort()



for ans_i in ans:

    print(ans_i)
from collections import Counter

N = int(eval(input()))
l = [eval(input()) for _ in range(N)]
cnt = Counter(l)
M = max(list(cnt.values()))
ans = []
for k in list(cnt.keys()):
    if cnt[k] == M:
        ans.append(k)
ans.sort()
for ans_i in ans:
    print(ans_i)

from collections import Counter

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

-l = [eval(input()) for _ in range(N)] -cnt = Counter(l) +S = [eval(input()) for _ in range(N)] +cnt = Counter(S) -for k in list(cnt.keys()): -    if cnt[k] == M: +for k, v in list(cnt.items()): +    if v == M: