import collections

N = int(input())
S_list = []
for n in range(N):
  S_list.append(input())

c = collections.Counter(S_list)
max_list = []
_max_value = 0
for idx, value in enumerate(c.most_common()):
  if idx == 0:
    max_list.append(value[0])
    _max = value[1]
    continue
  if _max == value[1]:
    max_list.append(value[0])
  else:
    break

for answer in sorted(max_list):
  print(answer) import collections collections N = int(input()) N int(input()) int input() input S_list = [] S_list [] for n in range(N):
  S_list.append(input()) n range(N) range N S_list.append(input()) S_list.append S_list append input() input c = collections.Counter(S_list) c collections.Counter(S_list) collections.Counter collections Counter S_list max_list = [] max_list [] _max_value = 0 _max_value 0 for idx, value in enumerate(c.most_common()):
  if idx == 0:
    max_list.append(value[0])
    _max = value[1]
    continue
  if _max == value[1]:
    max_list.append(value[0])
  else:
    break idx value enumerate(c.most_common()) enumerate c.most_common() c.most_common c most_common if idx == 0:
    max_list.append(value[0])
    _max = value[1]
    continue
   idx == 0 idx 0 max_list.append(value[0]) max_list.append max_list append value[0] value 0 _max = value[1] _max value[1] value 1 continue if _max == value[1]:
    max_list.append(value[0])
  else:
    break _max == value[1] _max value[1] value 1 max_list.append(value[0]) max_list.append max_list append value[0] value 0 break for answer in sorted(max_list):
  print(answer) answer sorted(max_list) sorted max_list print(answer) print answer c = collections.Counter(S_list) collections.Counter(S_list) c S_list = [] [] S_list max_list = [] [] max_list _max_value = 0 0 _max_value N = int(input()) int(input()) N _max = value[1] value[1] _max
import collections

N = int(input())
S_list = []
for n in range(N):
  S_list.append(input())

c = collections.Counter(S_list)
max_list = []
_max_value = 0
for idx, value in enumerate(c.most_common()):
  if idx == 0:
    max_list.append(value[0])
    _max = value[1]
    continue
  if _max == value[1]:
    max_list.append(value[0])
  else:
    break

for answer in sorted(max_list):
  print(answer)