n = int(input())
s = [input() for _ in range(n)]
d = {}

for i in s:
    d[i] = d.get(i, 0) + 1

d = sorted(d.items(), key=lambda x: x[1], reverse=True)
maxv = d[0][1]
ans = []
for s in d:
    if s[1] == maxv:
        ans.append(s[0])
    else:
        break

for p in sorted(ans):
    print(p) n = int(input()) n int(input()) int input() input input() for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) input() input s = [input() for _ in range(n)] s [input() for _ in range(n)] d = {} d {} for i in s:
    d[i] = d.get(i, 0) + 1 i s d[i] = d.get(i, 0) + 1 d[i] d i d.get(i, 0) + 1 d.get(i, 0) d.get d get i 0 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 maxv = d[0][1] maxv d[0][1] [0] d 0 1 ans = [] ans [] for s in d:
    if s[1] == maxv:
        ans.append(s[0])
    else:
        break s d if s[1] == maxv:
        ans.append(s[0])
    else:
        break s[1] == maxv s[1] s 1 maxv ans.append(s[0]) ans.append ans append s[0] s 0 break for p in sorted(ans):
    print(p) p sorted(ans) sorted ans print(p) print p d = {} {} d maxv = d[0][1] d[0][1] maxv ans = [] [] ans n = int(input()) int(input()) n s = [input() for _ in range(n)] [input() for _ in range(n)] s d = sorted(d.items(), key=lambda x: x[1], reverse=True) sorted(d.items(), key=lambda x: x[1], reverse=True) d
n = int(input())
s = [input() for _ in range(n)]
d = {}

for i in s:
    d[i] = d.get(i, 0) + 1

d = sorted(d.items(), key=lambda x: x[1], reverse=True)
maxv = d[0][1]
ans = []
for s in d:
    if s[1] == maxv:
        ans.append(s[0])
    else:
        break

for p in sorted(ans):
    print(p)
