import collections

N = int(input())
cnt_dic = collections.defaultdict(int)

for _ in range(N):
  s = input()
  cnt_dic[s] += 1

max_v = max(cnt_dic.values())

ans_lis = [k for k, v in cnt_dic.items() if v == max_v]

for s in sorted(ans_lis):
  print(s) import collections collections N = int(input()) N int(input()) int input() input cnt_dic = collections.defaultdict(int) cnt_dic collections.defaultdict(int) collections.defaultdict collections defaultdict int for _ in range(N):
  s = input()
  cnt_dic[s] += 1 _ range(N) range N s = input() s input() input cnt_dic[s] += 1 cnt_dic[s] cnt_dic s 1 max_v = max(cnt_dic.values()) max_v max(cnt_dic.values()) max cnt_dic.values() cnt_dic.values cnt_dic values k for k, v in cnt_dic.items() if v == max_v for k, v in cnt_dic.items() if v == max_v k v cnt_dic.items() cnt_dic.items cnt_dic items v == max_v v max_v if v == max_v k ans_lis = [k for k, v in cnt_dic.items() if v == max_v] ans_lis [k for k, v in cnt_dic.items() if v == max_v] for s in sorted(ans_lis):
  print(s) s sorted(ans_lis) sorted ans_lis print(s) print s N = int(input()) int(input()) N s = input() input() s ans_lis = [k for k, v in cnt_dic.items() if v == max_v] [k for k, v in cnt_dic.items() if v == max_v] ans_lis max_v = max(cnt_dic.values()) max(cnt_dic.values()) max_v cnt_dic = collections.defaultdict(int) collections.defaultdict(int) cnt_dic
import collections

N = int(input())
cnt_dic = collections.defaultdict(int)

for _ in range(N):
  s = input()
  cnt_dic[s] += 1

max_v = max(cnt_dic.values())

ans_lis = [k for k, v in cnt_dic.items() if v == max_v]

for s in sorted(ans_lis):
  print(s)
