N = int(input())
a = []
for i in range(N):
  a.append(input())
a = sorted(a)
count = 0
count_list=[]
b = []
for i,k in enumerate(a):
  if i == 0:
    continue
  if k == a[i-1]:
    count+=1
  else:
    count_list.append(count)
    b.append(a[i-1])
    count = 0
  if i==N-1:
    count_list.append(count)
    b.append(a[i])
maxi = 0
maxi_list =[]
for i,k in enumerate(count_list):
  if maxi <k:
    maxi_list.clear()
    maxi_list.append(b[i])
    maxi = k
  elif maxi == k:
    maxi_list.append(b[i])
  else:
    continue
for i in maxi_list:
  print(i)
    
          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 a = sorted(a) a sorted(a) sorted a count = 0 count 0 count_list=[] count_list [] b = [] b [] for i,k in enumerate(a):
  if i == 0:
    continue
  if k == a[i-1]:
    count+=1
  else:
    count_list.append(count)
    b.append(a[i-1])
    count = 0
  if i==N-1:
    count_list.append(count)
    b.append(a[i]) i k enumerate(a) enumerate a if i == 0:
    continue
   i == 0 i 0 continue if k == a[i-1]:
    count+=1
  else:
    count_list.append(count)
    b.append(a[i-1])
    count = 0
   k == a[i-1] k a[i-1] a i-1 i 1 count+=1 count 1 count_list.append(count) count_list.append count_list append count b.append(a[i-1]) b.append b append a[i-1] a i-1 i 1 count = 0 count 0 if i==N-1:
    count_list.append(count)
    b.append(a[i]) i==N-1 i N-1 N 1 count_list.append(count) count_list.append count_list append count b.append(a[i]) b.append b append a[i] a i maxi = 0 maxi 0 maxi_list =[] maxi_list [] for i,k in enumerate(count_list):
  if maxi <k:
    maxi_list.clear()
    maxi_list.append(b[i])
    maxi = k
  elif maxi == k:
    maxi_list.append(b[i])
  else:
    continue i k enumerate(count_list) enumerate count_list if maxi <k:
    maxi_list.clear()
    maxi_list.append(b[i])
    maxi = k
  elif maxi == k:
    maxi_list.append(b[i])
  else:
    continue maxi <k maxi k maxi_list.clear() maxi_list.clear maxi_list clear maxi_list.append(b[i]) maxi_list.append maxi_list append b[i] b i maxi = k maxi k elif maxi == k:
    maxi_list.append(b[i])
   maxi == k maxi k maxi_list.append(b[i]) maxi_list.append maxi_list append b[i] b i continue for i in maxi_list:
  print(i)
    
          i maxi_list print(i) print i a = sorted(a) sorted(a) a b = [] [] b maxi = k k maxi N = int(input()) int(input()) N maxi = 0 0 maxi a = [] [] a count_list=[] [] count_list count = 0 0 count count+=1 1 count count = 0 0 count maxi_list =[] [] maxi_list
N = int(input())
a = []
for i in range(N):
  a.append(input())
a = sorted(a)
count = 0
count_list=[]
b = []
for i,k in enumerate(a):
  if i == 0:
    continue
  if k == a[i-1]:
    count+=1
  else:
    count_list.append(count)
    b.append(a[i-1])
    count = 0
  if i==N-1:
    count_list.append(count)
    b.append(a[i])
maxi = 0
maxi_list =[]
for i,k in enumerate(count_list):
  if maxi <k:
    maxi_list.clear()
    maxi_list.append(b[i])
    maxi = k
  elif maxi == k:
    maxi_list.append(b[i])
  else:
    continue
for i in maxi_list:
  print(i)
    
         
