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

for i in range(N):
  S = input()
  if S in BOX:
    BOX[S] = (BOX[S] + 1)
  else:
    BOX[S] = 0

MAX = max(BOX.values())
keys = [k for k, v in BOX.items() if v == MAX]
keys = sorted(keys)
for i in range(len(keys)):
  print(keys[i]) N = int(input()) N int(input()) int input() input BOX = {} BOX {} for i in range(N):
  S = input()
  if S in BOX:
    BOX[S] = (BOX[S] + 1)
  else:
    BOX[S] = 0 i range(N) range N S = input() S input() input if S in BOX:
    BOX[S] = (BOX[S] + 1)
  else:
    BOX[S] = 0 S in BOX S BOX BOX[S] = (BOX[S] + 1) BOX[S] BOX S BOX[S] + 1 BOX[S] BOX S 1 BOX[S] = 0 BOX[S] BOX S 0 MAX = max(BOX.values()) MAX max(BOX.values()) max BOX.values() BOX.values BOX values k for k, v in BOX.items() if v == MAX for k, v in BOX.items() if v == MAX k v BOX.items() BOX.items BOX items v == MAX v MAX if v == MAX k keys = [k for k, v in BOX.items() if v == MAX] keys [k for k, v in BOX.items() if v == MAX] keys = sorted(keys) keys sorted(keys) sorted keys for i in range(len(keys)):
  print(keys[i]) i range(len(keys)) range len(keys) len keys print(keys[i]) print keys[i] keys i BOX = {} {} BOX N = int(input()) int(input()) N keys = [k for k, v in BOX.items() if v == MAX] [k for k, v in BOX.items() if v == MAX] keys MAX = max(BOX.values()) max(BOX.values()) MAX keys = sorted(keys) sorted(keys) keys S = input() input() S
N = int(input())
BOX = {}

for i in range(N):
  S = input()
  if S in BOX:
    BOX[S] = (BOX[S] + 1)
  else:
    BOX[S] = 0

MAX = max(BOX.values())
keys = [k for k, v in BOX.items() if v == MAX]
keys = sorted(keys)
for i in range(len(keys)):
  print(keys[i])
