from collections import Counter



n=int(eval(input()))

l=[eval(input()) for i in range(n)]

c=Counter(l)

d=max(c.values())

max_list=[k for k,v in list(c.items()) if v==d]

max_list.sort()

for j in max_list:

  print(j)
from collections import Counter



n=int(input())

l=[input() for i in range(n)]

c=Counter(l)

d=max(c.values())

max_list=[k for k,v in c.items() if v==d]

max_list.sort()

print(*max_list,sep="\n")

from collections import Counter

n = int(eval(input()))
l = [eval(input()) for i in range(n)]
c = Counter(l)
d = max(c.values())
max_list = [k for k, v in list(c.items()) if v == d]
max_list.sort()
for j in max_list:
    print(j)

from collections import Counter

n = int(input())
l = [input() for i in range(n)]
c = Counter(l)
d = max(c.values())
max_list = [k for k, v in c.items() if v == d]
max_list.sort()
print(*max_list, sep="\n")

-n = int(eval(input())) -l = [eval(input()) for i in range(n)] +n = int(input()) +l = [input() for i in range(n)] -max_list = [k for k, v in list(c.items()) if v == d] +max_list = [k for k, v in c.items() if v == d] -for j in max_list: -    print(j) +print(*max_list, sep="\n")