c={}
N=int(input())
for i in range(N):
  s=input()
  if s not in c:
    c[s]=1
  else:
    c[s]+=1
n=max(c.values())
L=list()
for i in c:
  if c[i]==n:
    L.append(i)
L=sorted(L)
for i in L:
  print(i) c={} c {} N=int(input()) N int(input()) int input() input for i in range(N):
  s=input()
  if s not in c:
    c[s]=1
  else:
    c[s]+=1 i range(N) range N s=input() s input() input if s not in c:
    c[s]=1
  else:
    c[s]+=1 s not in c s c c[s]=1 c[s] c s 1 c[s]+=1 c[s] c s 1 n=max(c.values()) n max(c.values()) max c.values() c.values c values L=list() L list() list for i in c:
  if c[i]==n:
    L.append(i) i c if c[i]==n:
    L.append(i) c[i]==n c[i] c i n L.append(i) L.append L append i L=sorted(L) L sorted(L) sorted L for i in L:
  print(i) i L print(i) print i c={} {} c L=list() list() L N=int(input()) int(input()) N s=input() input() s n=max(c.values()) max(c.values()) n L=sorted(L) sorted(L) L
c={}
N=int(input())
for i in range(N):
  s=input()
  if s not in c:
    c[s]=1
  else:
    c[s]+=1
n=max(c.values())
L=list()
for i in c:
  if c[i]==n:
    L.append(i)
L=sorted(L)
for i in L:
  print(i)