N=int(input())
S=list(input() for _ in range(N))

from collections import Counter

cnt=Counter(S)
max_cnt=cnt.most_common()[0][1]
ans=[]
for k, v in cnt.items():
	if v!=max_cnt:
		continue
	ans.append(k)
print(*sorted(ans), sep="\n") N=int(input()) N int(input()) int input() input S=list(input() for _ in range(N)) S list(input() for _ in range(N)) list input() input from collections import Counter cnt=Counter(S) cnt Counter(S) Counter S max_cnt=cnt.most_common()[0][1] max_cnt cnt.most_common()[0][1] [0] cnt.most_common() cnt.most_common cnt most_common 0 1 ans=[] ans [] for k, v in cnt.items():
	if v!=max_cnt:
		continue
	ans.append(k) k v cnt.items() cnt.items cnt items if v!=max_cnt:
		continue
	 v!=max_cnt v max_cnt continue ans.append(k) ans.append ans append k print(*sorted(ans), sep="\n") print *sorted(ans) sorted(ans) sorted ans sep="\n" sep "\n" max_cnt=cnt.most_common()[0][1] cnt.most_common()[0][1] max_cnt cnt=Counter(S) Counter(S) cnt ans=[] [] ans S=list(input() for _ in range(N)) list(input() for _ in range(N)) S N=int(input()) int(input()) N
N=int(input())
S=list(input() for _ in range(N))

from collections import Counter

cnt=Counter(S)
max_cnt=cnt.most_common()[0][1]
ans=[]
for k, v in cnt.items():
	if v!=max_cnt:
		continue
	ans.append(k)
print(*sorted(ans), sep="\n")