import collections
n = int(input())
s = [input() for l in range(n)]
word = collections.Counter(s)
ma = max(word.values())
z = [kv for kv in word.items() if kv[1] == ma]
z = sorted(z)
for c in z:
  print(c[0]) import collections collections n = int(input()) n int(input()) int input() input input() for l in range(n) for l in range(n) l range(n) range n for l in range(n) input() input s = [input() for l in range(n)] s [input() for l in range(n)] word = collections.Counter(s) word collections.Counter(s) collections.Counter collections Counter s ma = max(word.values()) ma max(word.values()) max word.values() word.values word values kv for kv in word.items() if kv[1] == ma for kv in word.items() if kv[1] == ma kv word.items() word.items word items kv[1] == ma kv[1] kv 1 ma if kv[1] == ma kv z = [kv for kv in word.items() if kv[1] == ma] z [kv for kv in word.items() if kv[1] == ma] z = sorted(z) z sorted(z) sorted z for c in z:
  print(c[0]) c z print(c[0]) print c[0] c 0 z = [kv for kv in word.items() if kv[1] == ma] [kv for kv in word.items() if kv[1] == ma] z word = collections.Counter(s) collections.Counter(s) word s = [input() for l in range(n)] [input() for l in range(n)] s ma = max(word.values()) max(word.values()) ma z = sorted(z) sorted(z) z n = int(input()) int(input()) n
import collections
n = int(input())
s = [input() for l in range(n)]
word = collections.Counter(s)
ma = max(word.values())
z = [kv for kv in word.items() if kv[1] == ma]
z = sorted(z)
for c in z:
  print(c[0])
