import collections

N = int(input())
S = [input() for i in range(N)]
C = collections.Counter(S)
L = C.most_common()

ans = []
flag = 0

for n in range(len(C)):
    if L[n][1] < flag:
        break
    else:
        ans.append(L[n][0])
        flag = (L[n][1])

ans.sort()

for i in range(len(ans)):
    print(ans[i]) 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)] C = collections.Counter(S) C collections.Counter(S) collections.Counter collections Counter S L = C.most_common() L C.most_common() C.most_common C most_common ans = [] ans [] flag = 0 flag 0 for n in range(len(C)):
    if L[n][1] < flag:
        break
    else:
        ans.append(L[n][0])
        flag = (L[n][1]) n range(len(C)) range len(C) len C if L[n][1] < flag:
        break
    else:
        ans.append(L[n][0])
        flag = (L[n][1]) L[n][1] < flag L[n][1] [n] L n 1 flag break ans.append(L[n][0]) ans.append ans append L[n][0] [n] L n 0 flag = (L[n][1]) flag L[n][1] [n] L n 1 ans.sort() ans.sort ans sort for i in range(len(ans)):
    print(ans[i]) i range(len(ans)) range len(ans) len ans print(ans[i]) print ans[i] ans i L = C.most_common() C.most_common() L flag = (L[n][1]) L[n][1] flag S = [input() for i in range(N)] [input() for i in range(N)] S C = collections.Counter(S) collections.Counter(S) C ans = [] [] ans flag = 0 0 flag N = int(input()) int(input()) N
import collections

N = int(input())
S = [input() for i in range(N)]
C = collections.Counter(S)
L = C.most_common()

ans = []
flag = 0

for n in range(len(C)):
    if L[n][1] < flag:
        break
    else:
        ans.append(L[n][0])
        flag = (L[n][1])

ans.sort()

for i in range(len(ans)):
    print(ans[i])