from collections import Counter

n=int(input())

s=tuple(input() for i in range(n))



count=Counter(s)



max=max(count.values())



ans=[key for key in count if count[key]==max]

ans.sort()

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

from collections import Counter

n=int(eval(input()))

s=[]

for i in range(n):

    s.append(eval(input()))

c=Counter(s)



max=max(c.values())



ans=[]

for i,j in list(c.items()):

    if j == max:

        ans.append(i)

ans=sorted(ans)

print(('\n'.join(ans)))
from collections import Counter

n = int(input())
s = tuple(input() for i in range(n))
count = Counter(s)
max = max(count.values())
ans = [key for key in count if count[key] == max]
ans.sort()
print(*ans, sep="\n")

from collections import Counter

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

-n = int(input()) -s = tuple(input() for i in range(n)) -count = Counter(s) -max = max(count.values()) -ans = [key for key in count if count[key] == max] -ans.sort() -print(*ans, sep="\n") +n = int(eval(input())) +s = [] +for i in range(n): +    s.append(eval(input())) +c = Counter(s) +max = max(c.values()) +ans = [] +for i, j in list(c.items()): +    if j == max: +        ans.append(i) +ans = sorted(ans) +print(("\n".join(ans)))