N = int(input())
D = {}
for i in range(N):
	S = input()
	M = D.get(S)
	if M == None:
		D.update([(S, 1)])
	else:
		D.update([(S, M+1)])
E = list(D.keys())
F = list(D.values())
MA = max(F)
I = [i for i,x in enumerate(F) if x == MA]
ans =[]
for i in I:
	ans.append(E[i])
ans = sorted(ans)
print('\n'.join(ans)) N = int(input()) N int(input()) int input() input D = {} D {} for i in range(N):
	S = input()
	M = D.get(S)
	if M == None:
		D.update([(S, 1)])
	else:
		D.update([(S, M+1)]) i range(N) range N S = input() S input() input M = D.get(S) M D.get(S) D.get D get S if M == None:
		D.update([(S, 1)])
	else:
		D.update([(S, M+1)]) M == None M None D.update([(S, 1)]) D.update D update [(S, 1)] (S, 1) S 1 D.update([(S, M+1)]) D.update D update [(S, M+1)] (S, M+1) S M+1 M 1 E = list(D.keys()) E list(D.keys()) list D.keys() D.keys D keys F = list(D.values()) F list(D.values()) list D.values() D.values D values MA = max(F) MA max(F) max F i for i,x in enumerate(F) if x == MA for i,x in enumerate(F) if x == MA i x enumerate(F) enumerate F x == MA x MA if x == MA i I = [i for i,x in enumerate(F) if x == MA] I [i for i,x in enumerate(F) if x == MA] ans =[] ans [] for i in I:
	ans.append(E[i]) i I ans.append(E[i]) ans.append ans append E[i] E i ans = sorted(ans) ans sorted(ans) sorted ans print('\n'.join(ans)) print '\n'.join(ans) '\n'.join '\n' join ans S = input() input() S I = [i for i,x in enumerate(F) if x == MA] [i for i,x in enumerate(F) if x == MA] I F = list(D.values()) list(D.values()) F ans =[] [] ans MA = max(F) max(F) MA M = D.get(S) D.get(S) M N = int(input()) int(input()) N E = list(D.keys()) list(D.keys()) E ans = sorted(ans) sorted(ans) ans D = {} {} D
N = int(input())
D = {}
for i in range(N):
	S = input()
	M = D.get(S)
	if M == None:
		D.update([(S, 1)])
	else:
		D.update([(S, M+1)])
E = list(D.keys())
F = list(D.values())
MA = max(F)
I = [i for i,x in enumerate(F) if x == MA]
ans =[]
for i in I:
	ans.append(E[i])
ans = sorted(ans)
print('\n'.join(ans))