from collections import Counter

n = int(eval(input()))

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



count = Counter(s)

maxNum = max(count.values())

t = sorted(list(set(s)))

for i in t:

  if count[i] == maxNum:

    print(i)
from collections import Counter

n = int(input())

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



count = Counter(s)

t = max(count.values())

ans = []

for i in count.items():

  if i[1] == t:

    ans.append(i[0])

print(*sorted(ans), sep='\n')

from collections import Counter

n = int(eval(input()))
s = [eval(input()) for _ in range(n)]
count = Counter(s)
maxNum = max(count.values())
t = sorted(list(set(s)))
for i in t:
    if count[i] == maxNum:
        print(i)

from collections import Counter

n = int(input())
s = [input() for _ in range(n)]
count = Counter(s)
t = max(count.values())
ans = []
for i in count.items():
    if i[1] == t:
        ans.append(i[0])
print(*sorted(ans), sep="\n")

-n = int(eval(input())) -s = [eval(input()) for _ in range(n)] +n = int(input()) +s = [input() for _ in range(n)] -maxNum = max(count.values()) -t = sorted(list(set(s))) -for i in t: -    if count[i] == maxNum: -        print(i) +t = max(count.values()) +ans = [] +for i in count.items(): +    if i[1] == t: +        ans.append(i[0]) +print(*sorted(ans), sep="\n")