n=int(input())

S={}
maxr=0
for i in range(n):
    s=input()
    if s in S:
        S[s]+=1
    else:
        S[s]=1

maxc = max(S.values())

ans=[]
for s in S:
    if S[s]==maxc :
        ans.append(s)

ans.sort()
for s in ans:
    print(s)         n=int(input()) n int(input()) int input() input S={} S {} maxr=0 maxr 0 for i in range(n):
    s=input()
    if s in S:
        S[s]+=1
    else:
        S[s]=1 i range(n) range n s=input() s input() input if s in S:
        S[s]+=1
    else:
        S[s]=1 s in S s S S[s]+=1 S[s] S s 1 S[s]=1 S[s] S s 1 maxc = max(S.values()) maxc max(S.values()) max S.values() S.values S values ans=[] ans [] for s in S:
    if S[s]==maxc :
        ans.append(s) s S if S[s]==maxc :
        ans.append(s) S[s]==maxc S[s] S s maxc ans.append(s) ans.append ans append s ans.sort() ans.sort ans sort for s in ans:
    print(s)         s ans print(s) print s S={} {} S ans=[] [] ans maxr=0 0 maxr s=input() input() s maxc = max(S.values()) max(S.values()) maxc n=int(input()) int(input()) n
n=int(input())

S={}
maxr=0
for i in range(n):
    s=input()
    if s in S:
        S[s]+=1
    else:
        S[s]=1

maxc = max(S.values())

ans=[]
for s in S:
    if S[s]==maxc :
        ans.append(s)

ans.sort()
for s in ans:
    print(s)        