n = int(input())
dic = {}
for _ in range(n):
    s = input()
    if s in dic:
        dic[s] += 1
    else:
        dic[s] = 1
mv = max(dic.values())
for s, v in sorted(dic.items()):
    if v == mv:
        print(s) n = int(input()) n int(input()) int input() input dic = {} dic {} for _ in range(n):
    s = input()
    if s in dic:
        dic[s] += 1
    else:
        dic[s] = 1 _ range(n) range n s = input() s input() input if s in dic:
        dic[s] += 1
    else:
        dic[s] = 1 s in dic s dic dic[s] += 1 dic[s] dic s 1 dic[s] = 1 dic[s] dic s 1 mv = max(dic.values()) mv max(dic.values()) max dic.values() dic.values dic values for s, v in sorted(dic.items()):
    if v == mv:
        print(s) s v sorted(dic.items()) sorted dic.items() dic.items dic items if v == mv:
        print(s) v == mv v mv print(s) print s n = int(input()) int(input()) n dic = {} {} dic s = input() input() s mv = max(dic.values()) max(dic.values()) mv
n = int(input())
dic = {}
for _ in range(n):
    s = input()
    if s in dic:
        dic[s] += 1
    else:
        dic[s] = 1
mv = max(dic.values())
for s, v in sorted(dic.items()):
    if v == mv:
        print(s)