import sys
import collections

S = int(next(sys.stdin))
_A = (s.strip() for s in sys.stdin)
A = collections.Counter(_A)

# print(A)
# print(max(A.values()))

m = max(A.values())
keys = [k for k, v in A.items() if v == m]
keys.sort()
for s in keys:
  print(s) import sys sys import collections collections S = int(next(sys.stdin)) S int(next(sys.stdin)) int next(sys.stdin) next sys.stdin sys stdin s.strip() for s in sys.stdin for s in sys.stdin s sys.stdin sys stdin for s in sys.stdin s.strip() s.strip s strip _A = (s.strip() for s in sys.stdin) _A (s.strip() for s in sys.stdin) A = collections.Counter(_A) A collections.Counter(_A) collections.Counter collections Counter _A m = max(A.values()) m max(A.values()) max A.values() A.values A values k for k, v in A.items() if v == m for k, v in A.items() if v == m k v A.items() A.items A items v == m v m if v == m k keys = [k for k, v in A.items() if v == m] keys [k for k, v in A.items() if v == m] keys.sort() keys.sort keys sort for s in keys:
  print(s) s keys print(s) print s S = int(next(sys.stdin)) int(next(sys.stdin)) S keys = [k for k, v in A.items() if v == m] [k for k, v in A.items() if v == m] keys A = collections.Counter(_A) collections.Counter(_A) A _A = (s.strip() for s in sys.stdin) (s.strip() for s in sys.stdin) _A m = max(A.values()) max(A.values()) m
import sys
import collections

S = int(next(sys.stdin))
_A = (s.strip() for s in sys.stdin)
A = collections.Counter(_A)

# print(A)
# print(max(A.values()))

m = max(A.values())
keys = [k for k, v in A.items() if v == m]
keys.sort()
for s in keys:
  print(s)