n = int(input())
d = {}
for _ in range(n):
  s = input()
  if s in d: d[s] += 1
  else: d[s] = 1
  
t = max(d.values())
for x,y in sorted(d.items()):
  if y == t: print(x) n = int(input()) n int(input()) int input() input d = {} d {} for _ in range(n):
  s = input()
  if s in d: d[s] += 1
  else: d[s] = 1
   _ range(n) range n s = input() s input() input if s in d: d[s] += 1
  else: d[s] = 1
   s in d s d t = max(d.values()) t max(d.values()) max d.values() d.values d values for x,y in sorted(d.items()):
  if y == t: print(x) x y sorted(d.items()) sorted d.items() d.items d items if y == t: print(x) y == t y t n = int(input()) int(input()) n d = {} {} d s = input() input() s t = max(d.values()) max(d.values()) t
n = int(input())
d = {}
for _ in range(n):
  s = input()
  if s in d: d[s] += 1
  else: d[s] = 1
  
t = max(d.values())
for x,y in sorted(d.items()):
  if y == t: print(x)