N = int(input())

d = {}
for _ in range(N):
  s = input()
  if s in d:
    d[s] += 1
  else:
    d[s] = 1
    
d = {k: v for k, v in sorted(d.items(), key=lambda item: item[1], reverse=True)}

max_count = -1
values = []
for k, v in d.items():
  if max_count < v:
    max_count = v
  if v != max_count:
    break
  values.append(k)

print("\n".join(sorted(values))) N = int(input()) N int(input()) int input() input d = {} d {} for _ in range(N):
  s = input()
  if s in d:
    d[s] += 1
  else:
    d[s] = 1
     _ range(N) range N s = input() s input() input if s in d:
    d[s] += 1
  else:
    d[s] = 1
     s in d s d d[s] += 1 d[s] d s 1 d[s] = 1 d[s] d s 1 k: v for k, v in sorted(d.items(), key=lambda item: item[1], reverse=True) for k, v in sorted(d.items(), key=lambda item: item[1], reverse=True) k v sorted(d.items(), key=lambda item: item[1], reverse=True) sorted d.items() d.items d items key=lambda item: item[1] key lambda item: item[1] item[1] item 1 item reverse=True reverse True for k, v in sorted(d.items(), key=lambda item: item[1], reverse=True) k v d = {k: v for k, v in sorted(d.items(), key=lambda item: item[1], reverse=True)} d {k: v for k, v in sorted(d.items(), key=lambda item: item[1], reverse=True)} max_count = -1 max_count -1 values = [] values [] for k, v in d.items():
  if max_count < v:
    max_count = v
  if v != max_count:
    break
  values.append(k) k v d.items() d.items d items if max_count < v:
    max_count = v
   max_count < v max_count v max_count = v max_count v if v != max_count:
    break
   v != max_count v max_count break values.append(k) values.append values append k print("\n".join(sorted(values))) print "\n".join(sorted(values)) "\n".join "\n" join sorted(values) sorted values N = int(input()) int(input()) N max_count = -1 -1 max_count d = {k: v for k, v in sorted(d.items(), key=lambda item: item[1], reverse=True)} {k: v for k, v in sorted(d.items(), key=lambda item: item[1], reverse=True)} d s = input() input() s d = {} {} d max_count = v v max_count values = [] [] values
N = int(input())

d = {}
for _ in range(N):
  s = input()
  if s in d:
    d[s] += 1
  else:
    d[s] = 1
    
d = {k: v for k, v in sorted(d.items(), key=lambda item: item[1], reverse=True)}

max_count = -1
values = []
for k, v in d.items():
  if max_count < v:
    max_count = v
  if v != max_count:
    break
  values.append(k)

print("\n".join(sorted(values)))