from collections import Counter

n = int(eval(input()))



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

mx = max(s.values())

ans = []

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

    if v==mx:

        ans.append(k)

for i in sorted(ans):

    print(i)
from collections import defaultdict

n = int(eval(input()))

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

dd = defaultdict(int)



for x in s:

    dd[x] += 1

mx = max(dd.values())



for k in sorted(j for j,y in list(dd.items()) if y == mx):

    print(k)
from collections import Counter

n = int(eval(input()))
s = Counter([eval(input()) for _ in range(n)])
mx = max(s.values())
ans = []
for k, v in list(s.items()):
    if v == mx:
        ans.append(k)
for i in sorted(ans):
    print(i)

from collections import defaultdict

n = int(eval(input()))
s = [eval(input()) for _ in range(n)]
dd = defaultdict(int)
for x in s:
    dd[x] += 1
mx = max(dd.values())
for k in sorted(j for j, y in list(dd.items()) if y == mx):
    print(k)

-from collections import Counter +from collections import defaultdict -s = Counter([eval(input()) for _ in range(n)]) -mx = max(s.values()) -ans = [] -for k, v in list(s.items()): -    if v == mx: -        ans.append(k) -for i in sorted(ans): -    print(i) +s = [eval(input()) for _ in range(n)] +dd = defaultdict(int) +for x in s: +    dd[x] += 1 +mx = max(dd.values()) +for k in sorted(j for j, y in list(dd.items()) if y == mx): +    print(k)