import collections
N=int(input())
S=[]
for i in range(N):
  s=input()
  S.append(s)

l=collections.Counter(S)
keys=l.keys()
k=max(l.values())
ans=[]
for i in keys:
  if l[i]==k:
    ans.append(i)

ans.sort()
n=len(ans)

for i in range(n):
  print(ans[i]) import collections collections N=int(input()) N int(input()) int input() input S=[] S [] for i in range(N):
  s=input()
  S.append(s) i range(N) range N s=input() s input() input S.append(s) S.append S append s l=collections.Counter(S) l collections.Counter(S) collections.Counter collections Counter S keys=l.keys() keys l.keys() l.keys l keys k=max(l.values()) k max(l.values()) max l.values() l.values l values ans=[] ans [] for i in keys:
  if l[i]==k:
    ans.append(i) i keys if l[i]==k:
    ans.append(i) l[i]==k l[i] l i k ans.append(i) ans.append ans append i ans.sort() ans.sort ans sort n=len(ans) n len(ans) len ans for i in range(n):
  print(ans[i]) i range(n) range n print(ans[i]) print ans[i] ans i N=int(input()) int(input()) N s=input() input() s keys=l.keys() l.keys() keys n=len(ans) len(ans) n S=[] [] S ans=[] [] ans k=max(l.values()) max(l.values()) k l=collections.Counter(S) collections.Counter(S) l
import collections
N=int(input())
S=[]
for i in range(N):
  s=input()
  S.append(s)

l=collections.Counter(S)
keys=l.keys()
k=max(l.values())
ans=[]
for i in keys:
  if l[i]==k:
    ans.append(i)

ans.sort()
n=len(ans)

for i in range(n):
  print(ans[i])