N = int(eval(input()))

S = [eval(input()) for _ in range(N)]

 

s = {}

for i in S:

  if i in s:

    s[i] += 1

  else:

    s[i] = 1

 

max_val = max(s.values())

tmp = []

for key, value in list(s.items()):

  if value == max_val:

    tmp.append(key)



for j in sorted(tmp):

  print(j)
from collections import defaultdict, Counter



n  = int(eval(input()))

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



a = Counter(lis)



tmp = 0

for key, value in list(a.items()):

    tmp = max(value, tmp)



ans =[]

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

    if v == tmp:

        ans.append(k)



for i in sorted(ans):

    print(i)
N = int(eval(input()))
S = [eval(input()) for _ in range(N)]
s = {}
for i in S:
    if i in s:
        s[i] += 1
    else:
        s[i] = 1
max_val = max(s.values())
tmp = []
for key, value in list(s.items()):
    if value == max_val:
        tmp.append(key)
for j in sorted(tmp):
    print(j)

from collections import defaultdict, Counter

n = int(eval(input()))
lis = [eval(input()) for _ in range(n)]
a = Counter(lis)
tmp = 0
for key, value in list(a.items()):
    tmp = max(value, tmp)
ans = []
for k, v in list(a.items()):
    if v == tmp:
        ans.append(k)
for i in sorted(ans):
    print(i)

-N = int(eval(input())) -S = [eval(input()) for _ in range(N)] -s = {} -for i in S: -    if i in s: -        s[i] += 1 -    else: -        s[i] = 1 -max_val = max(s.values()) -tmp = [] -for key, value in list(s.items()): -    if value == max_val: -        tmp.append(key) -for j in sorted(tmp): -    print(j) +from collections import defaultdict, Counter + +n = int(eval(input())) +lis = [eval(input()) for _ in range(n)] +a = Counter(lis) +tmp = 0 +for key, value in list(a.items()): +    tmp = max(value, tmp) +ans = [] +for k, v in list(a.items()): +    if v == tmp: +        ans.append(k) +for i in sorted(ans): +    print(i)