import os, sys, re, math

N = int(input())
S = []
for i in range(N):
    S.append(input())

d = {}
for s in S:
    if not s in d:
        d[s] = 0
    d[s] += 1

d = sorted(d.items(), key=lambda x:x[1], reverse=True)
names = [v[0] for v in d if v[1] == d[0][1]]

for name in sorted(names):
    print(name) import os, sys, re, math os sys re math N = int(input()) N int(input()) int input() input S = [] S [] for i in range(N):
    S.append(input()) i range(N) range N S.append(input()) S.append S append input() input d = {} d {} for s in S:
    if not s in d:
        d[s] = 0
    d[s] += 1 s S if not s in d:
        d[s] = 0
     not s in d s in d s d d[s] = 0 d[s] d s 0 d[s] += 1 d[s] d s 1 d = sorted(d.items(), key=lambda x:x[1], reverse=True) d sorted(d.items(), key=lambda x:x[1], reverse=True) sorted d.items() d.items d items key=lambda x:x[1] key lambda x:x[1] x[1] x 1 x reverse=True reverse True v[0] for v in d if v[1] == d[0][1] for v in d if v[1] == d[0][1] v d v[1] == d[0][1] v[1] v 1 d[0][1] [0] d 0 1 if v[1] == d[0][1] v[0] v 0 names = [v[0] for v in d if v[1] == d[0][1]] names [v[0] for v in d if v[1] == d[0][1]] for name in sorted(names):
    print(name) name sorted(names) sorted names print(name) print name d = sorted(d.items(), key=lambda x:x[1], reverse=True) sorted(d.items(), key=lambda x:x[1], reverse=True) d d = {} {} d names = [v[0] for v in d if v[1] == d[0][1]] [v[0] for v in d if v[1] == d[0][1]] names N = int(input()) int(input()) N S = [] [] S
import os, sys, re, math

N = int(input())
S = []
for i in range(N):
    S.append(input())

d = {}
for s in S:
    if not s in d:
        d[s] = 0
    d[s] += 1

d = sorted(d.items(), key=lambda x:x[1], reverse=True)
names = [v[0] for v in d if v[1] == d[0][1]]

for name in sorted(names):
    print(name)
