# C
from collections import Counter
N = int(input())
S = [input() for _ in range(N)]
countS = Counter(S)
maxS = max(countS.values())
ans = []
for key,value in countS.items():
  if value == maxS:
    ans.append(key)

for a in sorted(ans):
  print(a) from collections import Counter N = int(input()) N int(input()) int input() input input() for _ in range(N) for _ in range(N) _ range(N) range N for _ in range(N) input() input S = [input() for _ in range(N)] S [input() for _ in range(N)] countS = Counter(S) countS Counter(S) Counter S maxS = max(countS.values()) maxS max(countS.values()) max countS.values() countS.values countS values ans = [] ans [] for key,value in countS.items():
  if value == maxS:
    ans.append(key) key value countS.items() countS.items countS items if value == maxS:
    ans.append(key) value == maxS value maxS ans.append(key) ans.append ans append key for a in sorted(ans):
  print(a) a sorted(ans) sorted ans print(a) print a N = int(input()) int(input()) N ans = [] [] ans countS = Counter(S) Counter(S) countS maxS = max(countS.values()) max(countS.values()) maxS S = [input() for _ in range(N)] [input() for _ in range(N)] S
# C
from collections import Counter
N = int(input())
S = [input() for _ in range(N)]
countS = Counter(S)
maxS = max(countS.values())
ans = []
for key,value in countS.items():
  if value == maxS:
    ans.append(key)

for a in sorted(ans):
  print(a)
