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

word_list = {}

for i in range(N):
    if S[i] in word_list:
        word_list[S[i]] += 1
    else:
        word_list[S[i]] = 1

word_list_s = sorted(word_list.items(), key=lambda x:x[1], reverse=True)
word_list_s_max = []
for i in range(len(word_list_s)):
    if word_list_s[i][1] == word_list_s[0][1]:
        word_list_s_max.append(word_list_s[i])
word_list_s_2 = sorted(word_list_s_max, key=lambda x:x[0])

for i in range(len(word_list_s_2)):
    print(word_list_s_2[i][0]) N = int(input()) N int(input()) int input() input input() for _ in range(N) for _ in range(N) _ range(N) range N for _ in range(N) input() input S = [input() for _ in range(N)] S [input() for _ in range(N)] word_list = {} word_list {} for i in range(N):
    if S[i] in word_list:
        word_list[S[i]] += 1
    else:
        word_list[S[i]] = 1 i range(N) range N if S[i] in word_list:
        word_list[S[i]] += 1
    else:
        word_list[S[i]] = 1 S[i] in word_list S[i] S i word_list word_list[S[i]] += 1 word_list[S[i]] word_list S[i] S i 1 word_list[S[i]] = 1 word_list[S[i]] word_list S[i] S i 1 word_list_s = sorted(word_list.items(), key=lambda x:x[1], reverse=True) word_list_s sorted(word_list.items(), key=lambda x:x[1], reverse=True) sorted word_list.items() word_list.items word_list items key=lambda x:x[1] key lambda x:x[1] x[1] x 1 x reverse=True reverse True word_list_s_max = [] word_list_s_max [] for i in range(len(word_list_s)):
    if word_list_s[i][1] == word_list_s[0][1]:
        word_list_s_max.append(word_list_s[i]) i range(len(word_list_s)) range len(word_list_s) len word_list_s if word_list_s[i][1] == word_list_s[0][1]:
        word_list_s_max.append(word_list_s[i]) word_list_s[i][1] == word_list_s[0][1] word_list_s[i][1] [i] word_list_s i 1 word_list_s[0][1] [0] word_list_s 0 1 word_list_s_max.append(word_list_s[i]) word_list_s_max.append word_list_s_max append word_list_s[i] word_list_s i word_list_s_2 = sorted(word_list_s_max, key=lambda x:x[0]) word_list_s_2 sorted(word_list_s_max, key=lambda x:x[0]) sorted word_list_s_max key=lambda x:x[0] key lambda x:x[0] x[0] x 0 x for i in range(len(word_list_s_2)):
    print(word_list_s_2[i][0]) i range(len(word_list_s_2)) range len(word_list_s_2) len word_list_s_2 print(word_list_s_2[i][0]) print word_list_s_2[i][0] [i] word_list_s_2 i 0 word_list_s_2 = sorted(word_list_s_max, key=lambda x:x[0]) sorted(word_list_s_max, key=lambda x:x[0]) word_list_s_2 N = int(input()) int(input()) N word_list_s = sorted(word_list.items(), key=lambda x:x[1], reverse=True) sorted(word_list.items(), key=lambda x:x[1], reverse=True) word_list_s word_list = {} {} word_list S = [input() for _ in range(N)] [input() for _ in range(N)] S word_list_s_max = [] [] word_list_s_max
N = int(input())
S = [input() for _ in range(N)]

word_list = {}

for i in range(N):
    if S[i] in word_list:
        word_list[S[i]] += 1
    else:
        word_list[S[i]] = 1

word_list_s = sorted(word_list.items(), key=lambda x:x[1], reverse=True)
word_list_s_max = []
for i in range(len(word_list_s)):
    if word_list_s[i][1] == word_list_s[0][1]:
        word_list_s_max.append(word_list_s[i])
word_list_s_2 = sorted(word_list_s_max, key=lambda x:x[0])

for i in range(len(word_list_s_2)):
    print(word_list_s_2[i][0])