from collections import Counter
n=int(input())
a=[]
for i in range(n):
  a.append(input())
ac=Counter(a)
acs=sorted(ac.items(),key=lambda x:x[1],reverse=1)
z=len(acs)
i=0
temp=[]

while i<=z-1 and acs[i][1]==acs[0][1] :
  temp.append(acs[i][0])
  i+=1
temp.sort()
for i in temp:
  print(i) from collections import Counter n=int(input()) n int(input()) int input() input a=[] a [] for i in range(n):
  a.append(input()) i range(n) range n a.append(input()) a.append a append input() input ac=Counter(a) ac Counter(a) Counter a acs=sorted(ac.items(),key=lambda x:x[1],reverse=1) acs sorted(ac.items(),key=lambda x:x[1],reverse=1) sorted ac.items() ac.items ac items key=lambda x:x[1] key lambda x:x[1] x[1] x 1 x reverse=1 reverse 1 z=len(acs) z len(acs) len acs i=0 i 0 temp=[] temp [] while i<=z-1 and acs[i][1]==acs[0][1] :
  temp.append(acs[i][0])
  i+=1 i<=z-1 and acs[i][1]==acs[0][1] i<=z-1 i z-1 z 1 acs[i][1]==acs[0][1] acs[i][1] [i] acs i 1 acs[0][1] [0] acs 0 1 temp.append(acs[i][0]) temp.append temp append acs[i][0] [i] acs i 0 i+=1 i 1 temp.sort() temp.sort temp sort for i in temp:
  print(i) i temp print(i) print i z=len(acs) len(acs) z i=0 0 i temp=[] [] temp i+=1 1 i acs=sorted(ac.items(),key=lambda x:x[1],reverse=1) sorted(ac.items(),key=lambda x:x[1],reverse=1) acs ac=Counter(a) Counter(a) ac n=int(input()) int(input()) n a=[] [] a
from collections import Counter
n=int(input())
a=[]
for i in range(n):
  a.append(input())
ac=Counter(a)
acs=sorted(ac.items(),key=lambda x:x[1],reverse=1)
z=len(acs)
i=0
temp=[]

while i<=z-1 and acs[i][1]==acs[0][1] :
  temp.append(acs[i][0])
  i+=1
temp.sort()
for i in temp:
  print(i)