N=int(input())
L=list(input() for i in range(N))
L=sorted(L)
X=L[0]
c=0
d=0
e=[]
for i in range(N):
  if L[i]==X:
    c+=1
    if i==N-1 and c>d:
      e=[X]
    elif i==N-1 and c==d:
      e.append(X)
  elif L[i]!=X and d<c:
    d=c
    c=0
    e=[]
    e.append(X)
    X=L[i]
    c+=1
  elif L[i]!=X and d==c:
    c=1
    e.append(X)
    X=L[i]
    if i==N-1:
      e.append(X)
  elif L[i]!=X and d>c:
    c=0
    X=L[i]
    c+=1
for i in e:
  print(i) N=int(input()) N int(input()) int input() input L=list(input() for i in range(N)) L list(input() for i in range(N)) list input() input L=sorted(L) L sorted(L) sorted L X=L[0] X L[0] L 0 c=0 c 0 d=0 d 0 e=[] e [] for i in range(N):
  if L[i]==X:
    c+=1
    if i==N-1 and c>d:
      e=[X]
    elif i==N-1 and c==d:
      e.append(X)
  elif L[i]!=X and d<c:
    d=c
    c=0
    e=[]
    e.append(X)
    X=L[i]
    c+=1
  elif L[i]!=X and d==c:
    c=1
    e.append(X)
    X=L[i]
    if i==N-1:
      e.append(X)
  elif L[i]!=X and d>c:
    c=0
    X=L[i]
    c+=1 i range(N) range N if L[i]==X:
    c+=1
    if i==N-1 and c>d:
      e=[X]
    elif i==N-1 and c==d:
      e.append(X)
  elif L[i]!=X and d<c:
    d=c
    c=0
    e=[]
    e.append(X)
    X=L[i]
    c+=1
  elif L[i]!=X and d==c:
    c=1
    e.append(X)
    X=L[i]
    if i==N-1:
      e.append(X)
  elif L[i]!=X and d>c:
    c=0
    X=L[i]
    c+=1 L[i]==X L[i] L i X c+=1 c 1 if i==N-1 and c>d:
      e=[X]
    elif i==N-1 and c==d:
      e.append(X)
   i==N-1 and c>d i==N-1 i N-1 N 1 c>d c d e=[X] e [X] X elif i==N-1 and c==d:
      e.append(X)
   i==N-1 and c==d i==N-1 i N-1 N 1 c==d c d e.append(X) e.append e append X elif L[i]!=X and d<c:
    d=c
    c=0
    e=[]
    e.append(X)
    X=L[i]
    c+=1
   L[i]!=X and d<c L[i]!=X L[i] L i X d<c d c d=c d c c=0 c 0 e=[] e [] e.append(X) e.append e append X X=L[i] X L[i] L i c+=1 c 1 elif L[i]!=X and d==c:
    c=1
    e.append(X)
    X=L[i]
    if i==N-1:
      e.append(X)
   L[i]!=X and d==c L[i]!=X L[i] L i X d==c d c c=1 c 1 e.append(X) e.append e append X X=L[i] X L[i] L i if i==N-1:
      e.append(X)
   i==N-1 i N-1 N 1 e.append(X) e.append e append X elif L[i]!=X and d>c:
    c=0
    X=L[i]
    c+=1 L[i]!=X and d>c L[i]!=X L[i] L i X d>c d c c=0 c 0 X=L[i] X L[i] L i c+=1 c 1 for i in e:
  print(i) i e print(i) print i N=int(input()) int(input()) N c=0 0 c c=0 0 c X=L[0] L[0] X c=1 1 c L=list(input() for i in range(N)) list(input() for i in range(N)) L e=[] [] e X=L[i] L[i] X c+=1 1 c c+=1 1 c e=[X] [X] e X=L[i] L[i] X L=sorted(L) sorted(L) L d=0 0 d X=L[i] L[i] X c+=1 1 c c=0 0 c d=c c d e=[] [] e
N=int(input())
L=list(input() for i in range(N))
L=sorted(L)
X=L[0]
c=0
d=0
e=[]
for i in range(N):
  if L[i]==X:
    c+=1
    if i==N-1 and c>d:
      e=[X]
    elif i==N-1 and c==d:
      e.append(X)
  elif L[i]!=X and d<c:
    d=c
    c=0
    e=[]
    e.append(X)
    X=L[i]
    c+=1
  elif L[i]!=X and d==c:
    c=1
    e.append(X)
    X=L[i]
    if i==N-1:
      e.append(X)
  elif L[i]!=X and d>c:
    c=0
    X=L[i]
    c+=1
for i in e:
  print(i)