dict={}
for _ in range(int(input())):
  s=input()
  if s not in dict:
    dict[s] = 1
  else:
    dict[s] += 1
dict=sorted(dict.items(),key=lambda x:-x[1])
print(*sorted([dict[i][0] for i in range(len(dict)) if dict[0][1]==dict[i][1]]),sep='\n') dict={} dict {} for _ in range(int(input())):
  s=input()
  if s not in dict:
    dict[s] = 1
  else:
    dict[s] += 1 _ range(int(input())) range int(input()) int input() input s=input() s input() input 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 dict=sorted(dict.items(),key=lambda x:-x[1]) dict sorted(dict.items(),key=lambda x:-x[1]) sorted dict.items() dict.items dict items key=lambda x:-x[1] key lambda x:-x[1] -x[1] x[1] x 1 x dict[i][0] for i in range(len(dict)) if dict[0][1]==dict[i][1] for i in range(len(dict)) if dict[0][1]==dict[i][1] i range(len(dict)) range len(dict) len dict dict[0][1]==dict[i][1] dict[0][1] [0] dict 0 1 dict[i][1] [i] dict i 1 if dict[0][1]==dict[i][1] dict[i][0] [i] dict i 0 print(*sorted([dict[i][0] for i in range(len(dict)) if dict[0][1]==dict[i][1]]),sep='\n') print *sorted([dict[i][0] for i in range(len(dict)) if dict[0][1]==dict[i][1]]) sorted([dict[i][0] for i in range(len(dict)) if dict[0][1]==dict[i][1]]) sorted [dict[i][0] for i in range(len(dict)) if dict[0][1]==dict[i][1]] sep='\n' sep '\n' s=input() input() s dict=sorted(dict.items(),key=lambda x:-x[1]) sorted(dict.items(),key=lambda x:-x[1]) dict dict={} {} dict
dict={}
for _ in range(int(input())):
  s=input()
  if s not in dict:
    dict[s] = 1
  else:
    dict[s] += 1
dict=sorted(dict.items(),key=lambda x:-x[1])
print(*sorted([dict[i][0] for i in range(len(dict)) if dict[0][1]==dict[i][1]]),sep='\n')