import collections
n=int(input())
s=[]
for i in range(n):
  c=input()
  s.append(c)
a=collections.Counter(s)
d=sorted(a.items(), key=lambda x:x[1])
e=max(a.values())
l=[]
for i in a:
  if a[i]==e:
    l.append(i)
l.sort()
for i in l:
  print(i) import collections collections n=int(input()) n int(input()) int input() input s=[] s [] for i in range(n):
  c=input()
  s.append(c) i range(n) range n c=input() c input() input s.append(c) s.append s append c a=collections.Counter(s) a collections.Counter(s) collections.Counter collections Counter s d=sorted(a.items(), key=lambda x:x[1]) d sorted(a.items(), key=lambda x:x[1]) sorted a.items() a.items a items key=lambda x:x[1] key lambda x:x[1] x[1] x 1 x e=max(a.values()) e max(a.values()) max a.values() a.values a values l=[] l [] for i in a:
  if a[i]==e:
    l.append(i) i a if a[i]==e:
    l.append(i) a[i]==e a[i] a i e l.append(i) l.append l append i l.sort() l.sort l sort for i in l:
  print(i) i l print(i) print i e=max(a.values()) max(a.values()) e d=sorted(a.items(), key=lambda x:x[1]) sorted(a.items(), key=lambda x:x[1]) d a=collections.Counter(s) collections.Counter(s) a s=[] [] s l=[] [] l n=int(input()) int(input()) n c=input() input() c
import collections
n=int(input())
s=[]
for i in range(n):
  c=input()
  s.append(c)
a=collections.Counter(s)
d=sorted(a.items(), key=lambda x:x[1])
e=max(a.values())
l=[]
for i in a:
  if a[i]==e:
    l.append(i)
l.sort()
for i in l:
  print(i)