from collections import Counter

n = int(eval(input()))

list_S = [eval(input()) for _ in range(n)]

dic_S = Counter(list_S)

m = 0

for i in list(dic_S.values()):

    m = max(m, i)

ans = []

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

    if v == m:

       ans.append(k)

ans.sort()

for s in ans:

    print(s)
from collections import Counter

n = int(eval(input()))

list_S = []

ans = []

for _ in range(n):

    list_S.append(str(eval(input())))



list_S = Counter(list_S)

list_S = list(list_S.items())

list_S.sort(key=lambda x:x[1], reverse=True)



for l in list_S:

    if list_S[0][1] == l[1]:

        ans.append(l[0])

ans.sort()

for s in ans:

    print(s)
from collections import Counter

n = int(eval(input()))
list_S = [eval(input()) for _ in range(n)]
dic_S = Counter(list_S)
m = 0
for i in list(dic_S.values()):
    m = max(m, i)
ans = []
for k, v in list(dic_S.items()):
    if v == m:
        ans.append(k)
ans.sort()
for s in ans:
    print(s)

from collections import Counter

n = int(eval(input()))
list_S = []
ans = []
for _ in range(n):
    list_S.append(str(eval(input())))
list_S = Counter(list_S)
list_S = list(list_S.items())
list_S.sort(key=lambda x: x[1], reverse=True)
for l in list_S:
    if list_S[0][1] == l[1]:
        ans.append(l[0])
ans.sort()
for s in ans:
    print(s)

-list_S = [eval(input()) for _ in range(n)] -dic_S = Counter(list_S) -m = 0 -for i in list(dic_S.values()): -    m = max(m, i) +list_S = [] -for k, v in list(dic_S.items()): -    if v == m: -        ans.append(k) +for _ in range(n): +    list_S.append(str(eval(input()))) +list_S = Counter(list_S) +list_S = list(list_S.items()) +list_S.sort(key=lambda x: x[1], reverse=True) +for l in list_S: +    if list_S[0][1] == l[1]: +        ans.append(l[0])