import collections

n = int(eval(input()))

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

ss = collections.Counter(s)

# print(ss)



n_ma = max(ss.values())

ans = []

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

    if ss[k] == n_ma:

        ans.append(k)

ans = sorted(ans)

for a in ans:

    print(a)

import collections

n = int(eval(input()))

si = []

for i in range(n):

    si.append(eval(input()))



ss = collections.Counter(si)

n_ma = max(ss.values())

ans = []

for i in list(ss.keys()):

    if ss[i] == n_ma:

        ans.append(i)

ans.sort()

for i in range(len(ans)):

    print((ans[i]))



import collections

n = int(eval(input()))
s = [eval(input()) for _ in range(n)]
ss = collections.Counter(s)
# print(ss)
n_ma = max(ss.values())
ans = []
for k in list(ss.keys()):
    if ss[k] == n_ma:
        ans.append(k)
ans = sorted(ans)
for a in ans:
    print(a)

import collections

n = int(eval(input()))
si = []
for i in range(n):
    si.append(eval(input()))
ss = collections.Counter(si)
n_ma = max(ss.values())
ans = []
for i in list(ss.keys()):
    if ss[i] == n_ma:
        ans.append(i)
ans.sort()
for i in range(len(ans)):
    print((ans[i]))

-s = [eval(input()) for _ in range(n)] -ss = collections.Counter(s) -# print(ss) +si = [] +for i in range(n): +    si.append(eval(input())) +ss = collections.Counter(si) -for k in list(ss.keys()): -    if ss[k] == n_ma: -        ans.append(k) -ans = sorted(ans) -for a in ans: -    print(a) +for i in list(ss.keys()): +    if ss[i] == n_ma: +        ans.append(i) +ans.sort() +for i in range(len(ans)): +    print((ans[i]))