from collections import defaultdict
N = int(input())
dic = defaultdict(int)
for i in range(N):
    s = input()
    dic[s]+=1
m = 0
for i in dic:
    m = max(m, dic[i])
ans = []
for i in dic:
    if dic[i]==m:
        ans.append(i)
ans.sort()
for i in ans:
    print(i) from collections import defaultdict N = int(input()) N int(input()) int input() input dic = defaultdict(int) dic defaultdict(int) defaultdict int for i in range(N):
    s = input()
    dic[s]+=1 i range(N) range N s = input() s input() input dic[s]+=1 dic[s] dic s 1 m = 0 m 0 for i in dic:
    m = max(m, dic[i]) i dic m = max(m, dic[i]) m max(m, dic[i]) max m dic[i] dic i ans = [] ans [] for i in dic:
    if dic[i]==m:
        ans.append(i) i dic if dic[i]==m:
        ans.append(i) dic[i]==m dic[i] dic i m ans.append(i) ans.append ans append i ans.sort() ans.sort ans sort for i in ans:
    print(i) i ans print(i) print i s = input() input() s dic = defaultdict(int) defaultdict(int) dic ans = [] [] ans m = 0 0 m N = int(input()) int(input()) N m = max(m, dic[i]) max(m, dic[i]) m
from collections import defaultdict
N = int(input())
dic = defaultdict(int)
for i in range(N):
    s = input()
    dic[s]+=1
m = 0
for i in dic:
    m = max(m, dic[i])
ans = []
for i in dic:
    if dic[i]==m:
        ans.append(i)
ans.sort()
for i in ans:
    print(i)