n=int(input())
d={}
a=[]
for i in range(n):
  s=input()
  if s not in d:
    d[s]=1
    a.append(s)
  else:
    d[s]+=1
m=max(d.values())
a.sort()
for i in a:
  if d[i]==m:
    print(i) n=int(input()) n int(input()) int input() input d={} d {} a=[] a [] for i in range(n):
  s=input()
  if s not in d:
    d[s]=1
    a.append(s)
  else:
    d[s]+=1 i range(n) range n s=input() s input() input if s not in d:
    d[s]=1
    a.append(s)
  else:
    d[s]+=1 s not in d s d d[s]=1 d[s] d s 1 a.append(s) a.append a append s d[s]+=1 d[s] d s 1 m=max(d.values()) m max(d.values()) max d.values() d.values d values a.sort() a.sort a sort for i in a:
  if d[i]==m:
    print(i) i a if d[i]==m:
    print(i) d[i]==m d[i] d i m print(i) print i a=[] [] a m=max(d.values()) max(d.values()) m s=input() input() s d={} {} d n=int(input()) int(input()) n
n=int(input())
d={}
a=[]
for i in range(n):
  s=input()
  if s not in d:
    d[s]=1
    a.append(s)
  else:
    d[s]+=1
m=max(d.values())
a.sort()
for i in a:
  if d[i]==m:
    print(i)