from collections import defaultdict

N = int(input())
S = defaultdict(int)
for i in range(N):
    S[input()] += 1
m = max(S.values())
for s in sorted(filter(lambda x: S[x] == m, S)):
    print(s) from collections import defaultdict N = int(input()) N int(input()) int input() input S = defaultdict(int) S defaultdict(int) defaultdict int for i in range(N):
    S[input()] += 1 i range(N) range N S[input()] += 1 S[input()] S input() input 1 m = max(S.values()) m max(S.values()) max S.values() S.values S values for s in sorted(filter(lambda x: S[x] == m, S)):
    print(s) s sorted(filter(lambda x: S[x] == m, S)) sorted filter(lambda x: S[x] == m, S) filter lambda x: S[x] == m S[x] == m S[x] S x m x S print(s) print s m = max(S.values()) max(S.values()) m S = defaultdict(int) defaultdict(int) S N = int(input()) int(input()) N
from collections import defaultdict

N = int(input())
S = defaultdict(int)
for i in range(N):
    S[input()] += 1
m = max(S.values())
for s in sorted(filter(lambda x: S[x] == m, S)):
    print(s)