N = int(input())
D = {}

for n in range(N):
  S = input()
  D[S] = D.get(S,0)+1

L = max(D.values())

for k,v in sorted(D.items()):
  if v==L:
    print(k) N = int(input()) N int(input()) int input() input D = {} D {} for n in range(N):
  S = input()
  D[S] = D.get(S,0)+1 n range(N) range N S = input() S input() input D[S] = D.get(S,0)+1 D[S] D S D.get(S,0)+1 D.get(S,0) D.get D get S 0 1 L = max(D.values()) L max(D.values()) max D.values() D.values D values for k,v in sorted(D.items()):
  if v==L:
    print(k) k v sorted(D.items()) sorted D.items() D.items D items if v==L:
    print(k) v==L v L print(k) print k N = int(input()) int(input()) N D = {} {} D L = max(D.values()) max(D.values()) L S = input() input() S
N = int(input())
D = {}

for n in range(N):
  S = input()
  D[S] = D.get(S,0)+1

L = max(D.values())

for k,v in sorted(D.items()):
  if v==L:
    print(k)