n = int(input())

d = {}

for i in range(n):
  a = input()
  if a not in d:
    d[a] = 1
  else:
    d[a] += 1

dsorted = sorted(d.items(), key=lambda x:x[1], reverse=True)

name = []
cnt = dsorted[0][1]

for i in dsorted:
  if i[1] == cnt:
    name.append(i[0])
  else:
    break

name.sort()

for i in name:
  print(i) n = int(input()) n int(input()) int input() input d = {} d {} for i in range(n):
  a = input()
  if a not in d:
    d[a] = 1
  else:
    d[a] += 1 i range(n) range n a = input() a input() input if a not in d:
    d[a] = 1
  else:
    d[a] += 1 a not in d a d d[a] = 1 d[a] d a 1 d[a] += 1 d[a] d a 1 dsorted = sorted(d.items(), key=lambda x:x[1], reverse=True) dsorted sorted(d.items(), key=lambda x:x[1], reverse=True) sorted d.items() d.items d items key=lambda x:x[1] key lambda x:x[1] x[1] x 1 x reverse=True reverse True name = [] name [] cnt = dsorted[0][1] cnt dsorted[0][1] [0] dsorted 0 1 for i in dsorted:
  if i[1] == cnt:
    name.append(i[0])
  else:
    break i dsorted if i[1] == cnt:
    name.append(i[0])
  else:
    break i[1] == cnt i[1] i 1 cnt name.append(i[0]) name.append name append i[0] i 0 break name.sort() name.sort name sort for i in name:
  print(i) i name print(i) print i d = {} {} d name = [] [] name n = int(input()) int(input()) n a = input() input() a dsorted = sorted(d.items(), key=lambda x:x[1], reverse=True) sorted(d.items(), key=lambda x:x[1], reverse=True) dsorted cnt = dsorted[0][1] dsorted[0][1] cnt
n = int(input())

d = {}

for i in range(n):
  a = input()
  if a not in d:
    d[a] = 1
  else:
    d[a] += 1

dsorted = sorted(d.items(), key=lambda x:x[1], reverse=True)

name = []
cnt = dsorted[0][1]

for i in dsorted:
  if i[1] == cnt:
    name.append(i[0])
  else:
    break

name.sort()

for i in name:
  print(i)