N = int(input())
S = [input() for i in range(N)]
ans = dict()
for i in range(N):
    if S[i] in ans:
        ans[S[i]] += 1
    else:
        ans[S[i]] = 1
ans = sorted(ans.items(), key=lambda x:x[1] , reverse = True)
i = 0
kotae = []
while i < len(ans) and ans[0][1] == ans[i][1]:
    kotae.append(ans[i][0])
    i += 1
kotae.sort()
for j in kotae:
    print(j) 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)] ans = dict() ans dict() dict for i in range(N):
    if S[i] in ans:
        ans[S[i]] += 1
    else:
        ans[S[i]] = 1 i range(N) range N if S[i] in ans:
        ans[S[i]] += 1
    else:
        ans[S[i]] = 1 S[i] in ans S[i] S i ans ans[S[i]] += 1 ans[S[i]] ans S[i] S i 1 ans[S[i]] = 1 ans[S[i]] ans S[i] S i 1 ans = sorted(ans.items(), key=lambda x:x[1] , reverse = True) ans sorted(ans.items(), key=lambda x:x[1] , reverse = True) sorted ans.items() ans.items ans items key=lambda x:x[1] key lambda x:x[1] x[1] x 1 x reverse = True reverse True i = 0 i 0 kotae = [] kotae [] while i < len(ans) and ans[0][1] == ans[i][1]:
    kotae.append(ans[i][0])
    i += 1 i < len(ans) and ans[0][1] == ans[i][1] i < len(ans) i len(ans) len ans ans[0][1] == ans[i][1] ans[0][1] [0] ans 0 1 ans[i][1] [i] ans i 1 kotae.append(ans[i][0]) kotae.append kotae append ans[i][0] [i] ans i 0 i += 1 i 1 kotae.sort() kotae.sort kotae sort for j in kotae:
    print(j) j kotae print(j) print j N = int(input()) int(input()) N kotae = [] [] kotae S = [input() for i in range(N)] [input() for i in range(N)] S ans = sorted(ans.items(), key=lambda x:x[1] , reverse = True) sorted(ans.items(), key=lambda x:x[1] , reverse = True) ans i = 0 0 i i += 1 1 i ans = dict() dict() ans
N = int(input())
S = [input() for i in range(N)]
ans = dict()
for i in range(N):
    if S[i] in ans:
        ans[S[i]] += 1
    else:
        ans[S[i]] = 1
ans = sorted(ans.items(), key=lambda x:x[1] , reverse = True)
i = 0
kotae = []
while i < len(ans) and ans[0][1] == ans[i][1]:
    kotae.append(ans[i][0])
    i += 1
kotae.sort()
for j in kotae:
    print(j)