n=int(input())
s=list()
for i in range(n):
  s.append(input())

import collections

c=collections.Counter(s)



l=list()
max_=0
for cc in c.values():
  max_=max(cc, max_)

for ca,cb in c.items():
  if max_==cb:
    l.append(ca)

l.sort()
for ll in l:
  print(ll) n=int(input()) n int(input()) int input() input s=list() s list() list for i in range(n):
  s.append(input()) i range(n) range n s.append(input()) s.append s append input() input import collections collections c=collections.Counter(s) c collections.Counter(s) collections.Counter collections Counter s l=list() l list() list max_=0 max_ 0 for cc in c.values():
  max_=max(cc, max_) cc c.values() c.values c values max_=max(cc, max_) max_ max(cc, max_) max cc max_ for ca,cb in c.items():
  if max_==cb:
    l.append(ca) ca cb c.items() c.items c items if max_==cb:
    l.append(ca) max_==cb max_ cb l.append(ca) l.append l append ca l.sort() l.sort l sort for ll in l:
  print(ll) ll l print(ll) print ll n=int(input()) int(input()) n max_=max(cc, max_) max(cc, max_) max_ s=list() list() s max_=0 0 max_ c=collections.Counter(s) collections.Counter(s) c l=list() list() l
n=int(input())
s=list()
for i in range(n):
  s.append(input())

import collections

c=collections.Counter(s)



l=list()
max_=0
for cc in c.values():
  max_=max(cc, max_)

for ca,cb in c.items():
  if max_==cb:
    l.append(ca)

l.sort()
for ll in l:
  print(ll)
