# -*- coding: utf-8 -*-
N = int(input())
S = list()
words = {}
for i in range(N):
  s = input()
  S.append(s)
  if s in words:
    words[s] += 1
  else:
    words[s] = 1

max_value = max(words.values())
max_list = list()
for k,v in words.items():
  if v == max_value:
    max_list.append(k)
ans_list = sorted(max_list)
for ans in ans_list:
  print(ans) N = int(input()) N int(input()) int input() input S = list() S list() list words = {} words {} for i in range(N):
  s = input()
  S.append(s)
  if s in words:
    words[s] += 1
  else:
    words[s] = 1 i range(N) range N s = input() s input() input S.append(s) S.append S append s if s in words:
    words[s] += 1
  else:
    words[s] = 1 s in words s words words[s] += 1 words[s] words s 1 words[s] = 1 words[s] words s 1 max_value = max(words.values()) max_value max(words.values()) max words.values() words.values words values max_list = list() max_list list() list for k,v in words.items():
  if v == max_value:
    max_list.append(k) k v words.items() words.items words items if v == max_value:
    max_list.append(k) v == max_value v max_value max_list.append(k) max_list.append max_list append k ans_list = sorted(max_list) ans_list sorted(max_list) sorted max_list for ans in ans_list:
  print(ans) ans ans_list print(ans) print ans max_list = list() list() max_list S = list() list() S ans_list = sorted(max_list) sorted(max_list) ans_list max_value = max(words.values()) max(words.values()) max_value words = {} {} words s = input() input() s N = int(input()) int(input()) N
# -*- coding: utf-8 -*-
N = int(input())
S = list()
words = {}
for i in range(N):
  s = input()
  S.append(s)
  if s in words:
    words[s] += 1
  else:
    words[s] = 1

max_value = max(words.values())
max_list = list()
for k,v in words.items():
  if v == max_value:
    max_list.append(k)
ans_list = sorted(max_list)
for ans in ans_list:
  print(ans)