import collections
N = int(input())
S = []
ans = []
for i in range(N):
  S.append(input())
d = collections.Counter(S)
ome = max(d.values())
for k, v in d.items():
  if v == ome:
    ans.append(k)
ans.sort()
for x in ans:
  print(x) import collections collections N = int(input()) N int(input()) int input() input S = [] S [] ans = [] ans [] for i in range(N):
  S.append(input()) i range(N) range N S.append(input()) S.append S append input() input d = collections.Counter(S) d collections.Counter(S) collections.Counter collections Counter S ome = max(d.values()) ome max(d.values()) max d.values() d.values d values for k, v in d.items():
  if v == ome:
    ans.append(k) k v d.items() d.items d items if v == ome:
    ans.append(k) v == ome v ome ans.append(k) ans.append ans append k ans.sort() ans.sort ans sort for x in ans:
  print(x) x ans print(x) print x N = int(input()) int(input()) N S = [] [] S d = collections.Counter(S) collections.Counter(S) d ome = max(d.values()) max(d.values()) ome ans = [] [] ans
import collections
N = int(input())
S = []
ans = []
for i in range(N):
  S.append(input())
d = collections.Counter(S)
ome = max(d.values())
for k, v in d.items():
  if v == ome:
    ans.append(k)
ans.sort()
for x in ans:
  print(x)
