from collections import Counter

n = int(eval(input()))

s = []

for i in range(n):

    s.append(eval(input()))



c = Counter(s)

d = c.most_common()



t = []

t.append(d[0])

cnt = 1



if len(d)>1:

    for i in range(len(d)-1):

        if d[i+1][1]==t[0][1]:

            t.append(d[i+1])

            cnt+=1

        else:

            break



    t= sorted(t)



    for i in range(cnt):

        print((t[i][0]))



else:

    print((d[0][0]))
n=int(eval(input()))

ar = []

for i in range(n):

    a = eval(input())

    ar.append(a)

dic = {}



for i in range(n):

    if ar[i] not in dic:

        dic[ar[i]]=1

    else:

        dic[ar[i]]+=1



highest = max(dic.values())

ans = []



for keys in list(dic.keys()):

    if dic[keys] == highest:

        ans.append(keys)



ans = sorted(ans)

for i in ans:

    print(i)
from collections import Counter

n = int(eval(input()))
s = []
for i in range(n):
    s.append(eval(input()))
c = Counter(s)
d = c.most_common()
t = []
t.append(d[0])
cnt = 1
if len(d) > 1:
    for i in range(len(d) - 1):
        if d[i + 1][1] == t[0][1]:
            t.append(d[i + 1])
            cnt += 1
        else:
            break
    t = sorted(t)
    for i in range(cnt):
        print((t[i][0]))
else:
    print((d[0][0]))

n = int(eval(input()))
ar = []
for i in range(n):
    a = eval(input())
    ar.append(a)
dic = {}
for i in range(n):
    if ar[i] not in dic:
        dic[ar[i]] = 1
    else:
        dic[ar[i]] += 1
highest = max(dic.values())
ans = []
for keys in list(dic.keys()):
    if dic[keys] == highest:
        ans.append(keys)
ans = sorted(ans)
for i in ans:
    print(i)

-from collections import Counter - -s = [] +ar = [] -    s.append(eval(input())) -c = Counter(s) -d = c.most_common() -t = [] -t.append(d[0]) -cnt = 1 -if len(d) > 1: -    for i in range(len(d) - 1): -        if d[i + 1][1] == t[0][1]: -            t.append(d[i + 1]) -            cnt += 1 -        else: -            break -    t = sorted(t) -    for i in range(cnt): -        print((t[i][0])) -else: -    print((d[0][0])) +    a = eval(input()) +    ar.append(a) +dic = {} +for i in range(n): +    if ar[i] not in dic: +        dic[ar[i]] = 1 +    else: +        dic[ar[i]] += 1 +highest = max(dic.values()) +ans = [] +for keys in list(dic.keys()): +    if dic[keys] == highest: +        ans.append(keys) +ans = sorted(ans) +for i in ans: +    print(i)