N = int(eval(input()))

S = []

for i in range(N):

    S.append(eval(input()))

T = {}

for i in range(N):

  if S[i] in T:

    T[S[i]] += 1

  else:

    T.setdefault(S[i],1)

A = max(T.values())



keys = [k for k, v in list(T.items()) if v == A]

U =sorted(keys)



for i in range(len(U)):

  print((U[i]))
from collections import Counter



n = int(eval(input()))

a = [eval(input()) for x in range(n)]

b = Counter(a)

c = max(b.values())

s = [s for s, g in list(b.items()) if g == c]

s.sort()

print(('\n'.join(s)))
N = int(eval(input()))
S = []
for i in range(N):
    S.append(eval(input()))
T = {}
for i in range(N):
    if S[i] in T:
        T[S[i]] += 1
    else:
        T.setdefault(S[i], 1)
A = max(T.values())
keys = [k for k, v in list(T.items()) if v == A]
U = sorted(keys)
for i in range(len(U)):
    print((U[i]))

from collections import Counter

n = int(eval(input()))
a = [eval(input()) for x in range(n)]
b = Counter(a)
c = max(b.values())
s = [s for s, g in list(b.items()) if g == c]
s.sort()
print(("\n".join(s)))

-N = int(eval(input())) -S = [] -for i in range(N): -    S.append(eval(input())) -T = {} -for i in range(N): -    if S[i] in T: -        T[S[i]] += 1 -    else: -        T.setdefault(S[i], 1) -A = max(T.values()) -keys = [k for k, v in list(T.items()) if v == A] -U = sorted(keys) -for i in range(len(U)): -    print((U[i])) +from collections import Counter + +n = int(eval(input())) +a = [eval(input()) for x in range(n)] +b = Counter(a) +c = max(b.values()) +s = [s for s, g in list(b.items()) if g == c] +s.sort() +print(("\n".join(s)))