from collections import Counter



n = int(eval(input()))

s = []

for i in range(n):

    s.append(eval(input()))

cnt = Counter(s)



max_count = max(cnt.values())

ans = [k for k, count in list(cnt.items()) if count == max_count]



for a in sorted(ans):

    print(a)

from collections import Counter



n = int(eval(input()))

s = []

for i in range(n):

    s.append(eval(input()))

cnt = Counter(s)



max_count = max(cnt.values())

ans = [k for k, count in list(cnt.items()) if count == max_count]



print(("\n".join(sorted(ans))))

from collections import Counter

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

from collections import Counter

n = int(eval(input()))
s = []
for i in range(n):
    s.append(eval(input()))
cnt = Counter(s)
max_count = max(cnt.values())
ans = [k for k, count in list(cnt.items()) if count == max_count]
print(("\n".join(sorted(ans))))

-for a in sorted(ans): -    print(a) +print(("\n".join(sorted(ans))))