N = int(input())
dic = {}

for i in range (N):
  s = input()
  if s in dic:
    dic[s] += 1
  else:
    dic[s] = 1

sai = max(dic.values())

for j in sorted(k for k in dic if dic[k] == sai):
  print(j) N = int(input()) N int(input()) int input() input dic = {} dic {} for i in range (N):
  s = input()
  if s in dic:
    dic[s] += 1
  else:
    dic[s] = 1 i range (N) range N s = input() s input() input if s in dic:
    dic[s] += 1
  else:
    dic[s] = 1 s in dic s dic dic[s] += 1 dic[s] dic s 1 dic[s] = 1 dic[s] dic s 1 sai = max(dic.values()) sai max(dic.values()) max dic.values() dic.values dic values for j in sorted(k for k in dic if dic[k] == sai):
  print(j) j sorted(k for k in dic if dic[k] == sai) sorted k print(j) print j N = int(input()) int(input()) N dic = {} {} dic sai = max(dic.values()) max(dic.values()) sai s = input() input() s
N = int(input())
dic = {}

for i in range (N):
  s = input()
  if s in dic:
    dic[s] += 1
  else:
    dic[s] = 1

sai = max(dic.values())

for j in sorted(k for k in dic if dic[k] == sai):
  print(j)