from collections import Counter
n = int(input())
d = list(input() for _ in range(n))
D = Counter(d)
m = max(D.values())
l = []
for i,j in D.most_common():
  if m != j:
    break
  l.append(i)
l.sort()
for i in l:
  print(i) from collections import Counter n = int(input()) n int(input()) int input() input d = list(input() for _ in range(n)) d list(input() for _ in range(n)) list input() input D = Counter(d) D Counter(d) Counter d m = max(D.values()) m max(D.values()) max D.values() D.values D values l = [] l [] for i,j in D.most_common():
  if m != j:
    break
  l.append(i) i j D.most_common() D.most_common D most_common if m != j:
    break
   m != j m j break l.append(i) l.append l append i l.sort() l.sort l sort for i in l:
  print(i) i l print(i) print i D = Counter(d) Counter(d) D n = int(input()) int(input()) n d = list(input() for _ in range(n)) list(input() for _ in range(n)) d m = max(D.values()) max(D.values()) m l = [] [] l
from collections import Counter
n = int(input())
d = list(input() for _ in range(n))
D = Counter(d)
m = max(D.values())
l = []
for i,j in D.most_common():
  if m != j:
    break
  l.append(i)
l.sort()
for i in l:
  print(i)