N = int(eval(input()))

count = {}

for i in range(N):

    s = eval(input())

    count.setdefault(s, 0)

    count[s] += 1

p = max(count.values())

ans = []

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

    if count[k] == p:

        ans.append(k)

ans.sort()

for a in ans:

    print(a)
from collections import Counter

n = int(eval(input()))

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

s.sort()

d = Counter(s)

a = 0

for v in list(d.values()):

  if v>a:

    a = v

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

  if d[k]==a:

    print(k)
N = int(eval(input()))
count = {}
for i in range(N):
    s = eval(input())
    count.setdefault(s, 0)
    count[s] += 1
p = max(count.values())
ans = []
for k in list(count.keys()):
    if count[k] == p:
        ans.append(k)
ans.sort()
for a in ans:
    print(a)

from collections import Counter

n = int(eval(input()))
s = [eval(input()) for _ in range(n)]
s.sort()
d = Counter(s)
a = 0
for v in list(d.values()):
    if v > a:
        a = v
for k in list(d.keys()):
    if d[k] == a:
        print(k)

-N = int(eval(input())) -count = {} -for i in range(N): -    s = eval(input()) -    count.setdefault(s, 0) -    count[s] += 1 -p = max(count.values()) -ans = [] -for k in list(count.keys()): -    if count[k] == p: -        ans.append(k) -ans.sort() -for a in ans: -    print(a) +from collections import Counter + +n = int(eval(input())) +s = [eval(input()) for _ in range(n)] +s.sort() +d = Counter(s) +a = 0 +for v in list(d.values()): +    if v > a: +        a = v +for k in list(d.keys()): +    if d[k] == a: +        print(k)