N = int(input())
S = [input() for _ in range(N)]

# ABC-081-Cの類題！
# 方針：各文字列の出現回数を数え、出現回数が最大なる文字列を昇順に出力する
 
# 各単語の出現回数を数える（辞書型を用いる！！）
dic = {}
for i in range(N):
  s = S[i]
  if s not in dic: dic[s] = 1
  else: dic[s] += 1

max_count = max(dic.values()) # 最大の出現回数
 
# 出現回数が最も多い単語を集計する
l = [key for key in dic.keys() if dic[key] == max_count]
 
# 昇順にソートして出力
for i in sorted(l):
  print(i) N = int(input()) N int(input()) int input() input input() for _ in range(N) for _ in range(N) _ range(N) range N for _ in range(N) input() input S = [input() for _ in range(N)] S [input() for _ in range(N)] dic = {} dic {} for i in range(N):
  s = S[i]
  if s not in dic: dic[s] = 1
  else: dic[s] += 1 i range(N) range N s = S[i] s S[i] S i if s not in dic: dic[s] = 1
  else: dic[s] += 1 s not in dic s dic max_count = max(dic.values()) max_count max(dic.values()) max dic.values() dic.values dic values key for key in dic.keys() if dic[key] == max_count for key in dic.keys() if dic[key] == max_count key dic.keys() dic.keys dic keys dic[key] == max_count dic[key] dic key max_count if dic[key] == max_count key l = [key for key in dic.keys() if dic[key] == max_count] l [key for key in dic.keys() if dic[key] == max_count] for i in sorted(l):
  print(i) i sorted(l) sorted l print(i) print i max_count = max(dic.values()) max(dic.values()) max_count S = [input() for _ in range(N)] [input() for _ in range(N)] S l = [key for key in dic.keys() if dic[key] == max_count] [key for key in dic.keys() if dic[key] == max_count] l N = int(input()) int(input()) N s = S[i] S[i] s dic = {} {} dic
N = int(input())
S = [input() for _ in range(N)]

# ABC-081-Cの類題！
# 方針：各文字列の出現回数を数え、出現回数が最大なる文字列を昇順に出力する
 
# 各単語の出現回数を数える（辞書型を用いる！！）
dic = {}
for i in range(N):
  s = S[i]
  if s not in dic: dic[s] = 1
  else: dic[s] += 1

max_count = max(dic.values()) # 最大の出現回数
 
# 出現回数が最も多い単語を集計する
l = [key for key in dic.keys() if dic[key] == max_count]
 
# 昇順にソートして出力
for i in sorted(l):
  print(i)