q=int(input())
dic={}
for i in range(q):
    s=input()
    if not s in dic:
        dic[s]=1
    else:
        dic[s]+=1
max_val=max(dic.values())
a=sorted([i for i, k in dic.items() if k == max_val])
for i in a:
    print(i)
   q=int(input()) q int(input()) int input() input dic={} dic {} for i in range(q):
    s=input()
    if not s in dic:
        dic[s]=1
    else:
        dic[s]+=1 i range(q) range q s=input() s input() input if not s in dic:
        dic[s]=1
    else:
        dic[s]+=1 not s in dic s in dic s dic dic[s]=1 dic[s] dic s 1 dic[s]+=1 dic[s] dic s 1 max_val=max(dic.values()) max_val max(dic.values()) max dic.values() dic.values dic values i for i, k in dic.items() if k == max_val for i, k in dic.items() if k == max_val i k dic.items() dic.items dic items k == max_val k max_val if k == max_val i a=sorted([i for i, k in dic.items() if k == max_val]) a sorted([i for i, k in dic.items() if k == max_val]) sorted [i for i, k in dic.items() if k == max_val] for i in a:
    print(i)
   i a print(i) print i q=int(input()) int(input()) q max_val=max(dic.values()) max(dic.values()) max_val dic={} {} dic a=sorted([i for i, k in dic.items() if k == max_val]) sorted([i for i, k in dic.items() if k == max_val]) a s=input() input() s
q=int(input())
dic={}
for i in range(q):
    s=input()
    if not s in dic:
        dic[s]=1
    else:
        dic[s]+=1
max_val=max(dic.values())
a=sorted([i for i, k in dic.items() if k == max_val])
for i in a:
    print(i)
  