from collections import defaultdict
n = int(input())
dic = defaultdict(int)
for i in range(n):
  dic[input()] += 1
max_s = max(dic.values())
for k, v in sorted(dic.items()):
  if v == max_s:
    print(k) from collections import defaultdict n = int(input()) n int(input()) int input() input dic = defaultdict(int) dic defaultdict(int) defaultdict int for i in range(n):
  dic[input()] += 1 i range(n) range n dic[input()] += 1 dic[input()] dic input() input 1 max_s = max(dic.values()) max_s max(dic.values()) max dic.values() dic.values dic values for k, v in sorted(dic.items()):
  if v == max_s:
    print(k) k v sorted(dic.items()) sorted dic.items() dic.items dic items if v == max_s:
    print(k) v == max_s v max_s print(k) print k n = int(input()) int(input()) n max_s = max(dic.values()) max(dic.values()) max_s dic = defaultdict(int) defaultdict(int) dic
from collections import defaultdict
n = int(input())
dic = defaultdict(int)
for i in range(n):
  dic[input()] += 1
max_s = max(dic.values())
for k, v in sorted(dic.items()):
  if v == max_s:
    print(k)