import collections
N = int(input())
S = [input() for i in range(N)]
S = sorted(S)


C = collections.Counter(S)

M = C.most_common()
V = C.values()
MAX = max(V)

for i in range(len(M)):
    if M[i][1] == MAX:
        print(M[i][0]) import collections collections N = int(input()) N int(input()) int input() input input() for i in range(N) for i in range(N) i range(N) range N for i in range(N) input() input S = [input() for i in range(N)] S [input() for i in range(N)] S = sorted(S) S sorted(S) sorted S C = collections.Counter(S) C collections.Counter(S) collections.Counter collections Counter S M = C.most_common() M C.most_common() C.most_common C most_common V = C.values() V C.values() C.values C values MAX = max(V) MAX max(V) max V for i in range(len(M)):
    if M[i][1] == MAX:
        print(M[i][0]) i range(len(M)) range len(M) len M if M[i][1] == MAX:
        print(M[i][0]) M[i][1] == MAX M[i][1] [i] M i 1 MAX print(M[i][0]) print M[i][0] [i] M i 0 C = collections.Counter(S) collections.Counter(S) C S = [input() for i in range(N)] [input() for i in range(N)] S MAX = max(V) max(V) MAX N = int(input()) int(input()) N V = C.values() C.values() V S = sorted(S) sorted(S) S M = C.most_common() C.most_common() M
import collections
N = int(input())
S = [input() for i in range(N)]
S = sorted(S)


C = collections.Counter(S)

M = C.most_common()
V = C.values()
MAX = max(V)

for i in range(len(M)):
    if M[i][1] == MAX:
        print(M[i][0])
