N=int(input())
S={}
for n in range(N):
  s=input()
  S[s]=S.get(s,0)+1
  
S=sorted(S.items(), key=lambda x:(-x[1],x[0]))
maxS=S[0][1]
for s, cnt in S:
  if cnt!=maxS:
    break
  print(s) N=int(input()) N int(input()) int input() input S={} S {} for n in range(N):
  s=input()
  S[s]=S.get(s,0)+1
   n range(N) range N s=input() s input() input S[s]=S.get(s,0)+1 S[s] S s S.get(s,0)+1 S.get(s,0) S.get S get s 0 1 S=sorted(S.items(), key=lambda x:(-x[1],x[0])) S sorted(S.items(), key=lambda x:(-x[1],x[0])) sorted S.items() S.items S items key=lambda x:(-x[1],x[0]) key lambda x:(-x[1],x[0]) (-x[1],x[0]) -x[1] x[1] x 1 x[0] x 0 x maxS=S[0][1] maxS S[0][1] [0] S 0 1 for s, cnt in S:
  if cnt!=maxS:
    break
  print(s) s cnt S if cnt!=maxS:
    break
   cnt!=maxS cnt maxS break print(s) print s maxS=S[0][1] S[0][1] maxS S=sorted(S.items(), key=lambda x:(-x[1],x[0])) sorted(S.items(), key=lambda x:(-x[1],x[0])) S N=int(input()) int(input()) N S={} {} S s=input() input() s
N=int(input())
S={}
for n in range(N):
  s=input()
  S[s]=S.get(s,0)+1
  
S=sorted(S.items(), key=lambda x:(-x[1],x[0]))
maxS=S[0][1]
for s, cnt in S:
  if cnt!=maxS:
    break
  print(s)