from collections import defaultdict

N = int(eval(input()))

d = defaultdict(int)



for i in range(N):

    S = eval(input())

    d[S] += 1



m = 0

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

    m = max(d[k],m)



li = []

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

    if d[k] == m:

        li.append(k)



li.sort()

for l in li:

    print(l)
from collections import defaultdict

N = int(eval(input()))

Ss = [eval(input()) for i in range(N)]



d = defaultdict(int)

for S in Ss:

    d[S] += 1



mx = max([d[k] for k in list(d.keys())])



ans = []

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

    if d[k] == mx:

       ans.append(k)

       

for a in sorted(ans):

    print(a)
from collections import defaultdict

N = int(eval(input()))
d = defaultdict(int)
for i in range(N):
    S = eval(input())
    d[S] += 1
m = 0
for k in list(d.keys()):
    m = max(d[k], m)
li = []
for k in list(d.keys()):
    if d[k] == m:
        li.append(k)
li.sort()
for l in li:
    print(l)

from collections import defaultdict

N = int(eval(input()))
Ss = [eval(input()) for i in range(N)]
d = defaultdict(int)
for S in Ss:
    d[S] += 1
mx = max([d[k] for k in list(d.keys())])
ans = []
for k in list(d.keys()):
    if d[k] == mx:
        ans.append(k)
for a in sorted(ans):
    print(a)

+Ss = [eval(input()) for i in range(N)] -for i in range(N): -    S = eval(input()) +for S in Ss: -m = 0 +mx = max([d[k] for k in list(d.keys())]) +ans = [] -    m = max(d[k], m) -li = [] -for k in list(d.keys()): -    if d[k] == m: -        li.append(k) -li.sort() -for l in li: -    print(l) +    if d[k] == mx: +        ans.append(k) +for a in sorted(ans): +    print(a)