n=int(input())
dict={}
xs=[]
for i in range(n):
  s=input()
  xs+=[s]
  if s not in dict:
    dict[s]=1
  else:
    dict[s]+=1
pin=0
xs=list(set(xs))
for i in xs:
  pin=max(pin,dict[i])
ans=[]
for i in xs:
  if dict[i]==pin:
    ans+=[i]
ans.sort()
for i in ans:
  print(i) n=int(input()) n int(input()) int input() input dict={} dict {} xs=[] xs [] for i in range(n):
  s=input()
  xs+=[s]
  if s not in dict:
    dict[s]=1
  else:
    dict[s]+=1 i range(n) range n s=input() s input() input xs+=[s] xs [s] s if s not in dict:
    dict[s]=1
  else:
    dict[s]+=1 s not in dict s dict dict[s]=1 dict[s] dict s 1 dict[s]+=1 dict[s] dict s 1 pin=0 pin 0 xs=list(set(xs)) xs list(set(xs)) list set(xs) set xs for i in xs:
  pin=max(pin,dict[i]) i xs pin=max(pin,dict[i]) pin max(pin,dict[i]) max pin dict[i] dict i ans=[] ans [] for i in xs:
  if dict[i]==pin:
    ans+=[i] i xs if dict[i]==pin:
    ans+=[i] dict[i]==pin dict[i] dict i pin ans+=[i] ans [i] i ans.sort() ans.sort ans sort for i in ans:
  print(i) i ans print(i) print i ans+=[i] [i] ans xs=[] [] xs s=input() input() s pin=0 0 pin xs=list(set(xs)) list(set(xs)) xs ans=[] [] ans n=int(input()) int(input()) n dict={} {} dict pin=max(pin,dict[i]) max(pin,dict[i]) pin xs+=[s] [s] xs
n=int(input())
dict={}
xs=[]
for i in range(n):
  s=input()
  xs+=[s]
  if s not in dict:
    dict[s]=1
  else:
    dict[s]+=1
pin=0
xs=list(set(xs))
for i in xs:
  pin=max(pin,dict[i])
ans=[]
for i in xs:
  if dict[i]==pin:
    ans+=[i]
ans.sort()
for i in ans:
  print(i)