n = int(input())
d = dict()

for i in range(n):
  s = input()
  if(s not in d.keys()):
    d[s] = 1
  else:
    d[s] +=1
    
max = max(d.values())
ans = []
for i in d.keys():
  if(d[i] == max):
    ans.append(i)
for i in sorted(ans):
  print(i)
 n = int(input()) n int(input()) int input() input d = dict() d dict() dict for i in range(n):
  s = input()
  if(s not in d.keys()):
    d[s] = 1
  else:
    d[s] +=1
     i range(n) range n s = input() s input() input if(s not in d.keys()):
    d[s] = 1
  else:
    d[s] +=1
     s not in d.keys() s d.keys() d.keys d keys d[s] = 1 d[s] d s 1 d[s] +=1 d[s] d s 1 max = max(d.values()) max max(d.values()) max d.values() d.values d values ans = [] ans [] for i in d.keys():
  if(d[i] == max):
    ans.append(i) i d.keys() d.keys d keys if(d[i] == max):
    ans.append(i) d[i] == max d[i] d i max ans.append(i) ans.append ans append i for i in sorted(ans):
  print(i) i sorted(ans) sorted ans print(i) print i n = int(input()) int(input()) n max = max(d.values()) max(d.values()) max d = dict() dict() d ans = [] [] ans s = input() input() s
n = int(input())
d = dict()

for i in range(n):
  s = input()
  if(s not in d.keys()):
    d[s] = 1
  else:
    d[s] +=1
    
max = max(d.values())
ans = []
for i in d.keys():
  if(d[i] == max):
    ans.append(i)
for i in sorted(ans):
  print(i)

