N = int(input())
S = [input() for _ in range(N)]

from collections import Counter
C = Counter(S)

maxC = max(C.values())

A=[]
for k,v in C.items():
  # print(k,v)
  if v==maxC: A.append(k)

A = sorted(A)

for a in A:
  print(a)
 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)] from collections import Counter C = Counter(S) C Counter(S) Counter S maxC = max(C.values()) maxC max(C.values()) max C.values() C.values C values A=[] A [] for k,v in C.items():
  # print(k,v)
  if v==maxC: A.append(k) k v C.items() C.items C items if v==maxC: A.append( v==maxC v maxC A = sorted(A) A sorted(A) sorted A for a in A:
  print(a) a A print(a) print a N = int(input()) int(input()) N A = sorted(A) sorted(A) A C = Counter(S) Counter(S) C A=[] [] A maxC = max(C.values()) max(C.values()) maxC S = [input() for _ in range(N)] [input() for _ in range(N)] S
N = int(input())
S = [input() for _ in range(N)]

from collections import Counter
C = Counter(S)

maxC = max(C.values())

A=[]
for k,v in C.items():
  # print(k,v)
  if v==maxC: A.append(k)

A = sorted(A)

for a in A:
  print(a)

