from collections import Counter

n=int(eval(input()))

s=[]

for _ in range(n):

    s.append(eval(input()))

c = Counter(s)

ans=[]

max_vote = max(c.values())

for i,j in list(c.items()):

    if j == max_vote:

        ans.append(i)

print(("\n".join(sorted(ans))))
from collections import Counter

import sys

input = sys.stdin.readline

n=int(eval(input()))

s=[]

for _ in range(n):

    s.append(input().rstrip())

c = Counter(s)

ans=[]

max_vote = max(c.values())

for i,j in list(c.items()):

    if j == max_vote:

        ans.append(i)

print(("\n".join(sorted(ans))))
from collections import Counter

n = int(eval(input()))
s = []
for _ in range(n):
    s.append(eval(input()))
c = Counter(s)
ans = []
max_vote = max(c.values())
for i, j in list(c.items()):
    if j == max_vote:
        ans.append(i)
print(("\n".join(sorted(ans))))

from collections import Counter
import sys

input = sys.stdin.readline
n = int(eval(input()))
s = []
for _ in range(n):
    s.append(input().rstrip())
c = Counter(s)
ans = []
max_vote = max(c.values())
for i, j in list(c.items()):
    if j == max_vote:
        ans.append(i)
print(("\n".join(sorted(ans))))

+import sys +input = sys.stdin.readline -    s.append(eval(input())) +    s.append(input().rstrip())