n=int(input())
hoge={}
for i in range(n):
  tmp=input()
  if(tmp in  hoge):
    hoge[tmp]+=1
  else:
    hoge[tmp]=1
    
key_max=max(hoge.values())
keys = [k for k, v in hoge.items() if v ==key_max]
hoge=sorted(keys)
for i in range(len(hoge)):
  print(hoge[i]) n=int(input()) n int(input()) int input() input hoge={} hoge {} for i in range(n):
  tmp=input()
  if(tmp in  hoge):
    hoge[tmp]+=1
  else:
    hoge[tmp]=1
     i range(n) range n tmp=input() tmp input() input if(tmp in  hoge):
    hoge[tmp]+=1
  else:
    hoge[tmp]=1
     tmp in  hoge tmp hoge hoge[tmp]+=1 hoge[tmp] hoge tmp 1 hoge[tmp]=1 hoge[tmp] hoge tmp 1 key_max=max(hoge.values()) key_max max(hoge.values()) max hoge.values() hoge.values hoge values k for k, v in hoge.items() if v ==key_max for k, v in hoge.items() if v ==key_max k v hoge.items() hoge.items hoge items v ==key_max v key_max if v ==key_max k keys = [k for k, v in hoge.items() if v ==key_max] keys [k for k, v in hoge.items() if v ==key_max] hoge=sorted(keys) hoge sorted(keys) sorted keys for i in range(len(hoge)):
  print(hoge[i]) i range(len(hoge)) range len(hoge) len hoge print(hoge[i]) print hoge[i] hoge i tmp=input() input() tmp hoge={} {} hoge key_max=max(hoge.values()) max(hoge.values()) key_max hoge=sorted(keys) sorted(keys) hoge keys = [k for k, v in hoge.items() if v ==key_max] [k for k, v in hoge.items() if v ==key_max] keys n=int(input()) int(input()) n
n=int(input())
hoge={}
for i in range(n):
  tmp=input()
  if(tmp in  hoge):
    hoge[tmp]+=1
  else:
    hoge[tmp]=1
    
key_max=max(hoge.values())
keys = [k for k, v in hoge.items() if v ==key_max]
hoge=sorted(keys)
for i in range(len(hoge)):
  print(hoge[i])