import collections



n = int(eval(input()))

s = list(eval(input()) for _ in range(n))



c = dict(collections.Counter(s))

m = max(c.values())

ans = [k for k, v in list(c.items()) if v == m]



ans.sort()

for i in ans:

    print(i)
from  collections import Counter

N = int(eval(input()))

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



S = dict(Counter(S))

m = max(S.values())



ans = []

for s, v in list(S.items()):

    if v == m:

        ans.append(s)

ans.sort()



for a in ans:

    print(a)

import collections

n = int(eval(input()))
s = list(eval(input()) for _ in range(n))
c = dict(collections.Counter(s))
m = max(c.values())
ans = [k for k, v in list(c.items()) if v == m]
ans.sort()
for i in ans:
    print(i)

from collections import Counter

N = int(eval(input()))
S = [eval(input()) for _ in range(N)]
S = dict(Counter(S))
m = max(S.values())
ans = []
for s, v in list(S.items()):
    if v == m:
        ans.append(s)
ans.sort()
for a in ans:
    print(a)

-import collections +from collections import Counter -n = int(eval(input())) -s = list(eval(input()) for _ in range(n)) -c = dict(collections.Counter(s)) -m = max(c.values()) -ans = [k for k, v in list(c.items()) if v == m] +N = int(eval(input())) +S = [eval(input()) for _ in range(N)] +S = dict(Counter(S)) +m = max(S.values()) +ans = [] +for s, v in list(S.items()): +    if v == m: +        ans.append(s) -for i in ans: -    print(i) +for a in ans: +    print(a)