N = int(input())
S = []
for _ in range(N):
    S.append(input())

import sys
from collections import Counter

count_dict = Counter(S)
most_freq = count_dict.most_common(1)[0][1]

words = []

for word, freq in sorted(count_dict.items(), key=lambda x: -x[1]):
    if freq == most_freq:
        words.append(word)

for word in sorted(words):
    print(word) N = int(input()) N int(input()) int input() input S = [] S [] for _ in range(N):
    S.append(input()) _ range(N) range N S.append(input()) S.append S append input() input import sys sys from collections import Counter count_dict = Counter(S) count_dict Counter(S) Counter S most_freq = count_dict.most_common(1)[0][1] most_freq count_dict.most_common(1)[0][1] [0] count_dict.most_common(1) count_dict.most_common count_dict most_common 1 0 1 words = [] words [] for word, freq in sorted(count_dict.items(), key=lambda x: -x[1]):
    if freq == most_freq:
        words.append(word) word freq sorted(count_dict.items(), key=lambda x: -x[1]) sorted count_dict.items() count_dict.items count_dict items key=lambda x: -x[1] key lambda x: -x[1] -x[1] x[1] x 1 x if freq == most_freq:
        words.append(word) freq == most_freq freq most_freq words.append(word) words.append words append word for word in sorted(words):
    print(word) word sorted(words) sorted words print(word) print word words = [] [] words N = int(input()) int(input()) N S = [] [] S count_dict = Counter(S) Counter(S) count_dict most_freq = count_dict.most_common(1)[0][1] count_dict.most_common(1)[0][1] most_freq
N = int(input())
S = []
for _ in range(N):
    S.append(input())

import sys
from collections import Counter

count_dict = Counter(S)
most_freq = count_dict.most_common(1)[0][1]

words = []

for word, freq in sorted(count_dict.items(), key=lambda x: -x[1]):
    if freq == most_freq:
        words.append(word)

for word in sorted(words):
    print(word)
