n = int(input())

# 入力データ受取り時に、辞書に追加していくやり方
s_dict = {}
for i in range(n):
    s = input()    
    if s not in s_dict:
        s_dict[s] = 1
    s_dict[s] += 1

max_value = max(s_dict.values())
ans = []
for key, value in s_dict.items():
    if value == max_value:
        ans.append(key)

ans.sort()
for i in ans:
    print(i) n = int(input()) n int(input()) int input() input s_dict = {} s_dict {} for i in range(n):
    s = input()    
    if s not in s_dict:
        s_dict[s] = 1
    s_dict[s] += 1 i range(n) range n s = input() s input() input if s not in s_dict:
        s_dict[s] = 1
     s not in s_dict s s_dict s_dict[s] = 1 s_dict[s] s_dict s 1 s_dict[s] += 1 s_dict[s] s_dict s 1 max_value = max(s_dict.values()) max_value max(s_dict.values()) max s_dict.values() s_dict.values s_dict values ans = [] ans [] for key, value in s_dict.items():
    if value == max_value:
        ans.append(key) key value s_dict.items() s_dict.items s_dict items if value == max_value:
        ans.append(key) value == max_value value max_value ans.append(key) ans.append ans append key ans.sort() ans.sort ans sort for i in ans:
    print(i) i ans print(i) print i max_value = max(s_dict.values()) max(s_dict.values()) max_value n = int(input()) int(input()) n s = input() input() s ans = [] [] ans s_dict = {} {} s_dict
n = int(input())

# 入力データ受取り時に、辞書に追加していくやり方
s_dict = {}
for i in range(n):
    s = input()    
    if s not in s_dict:
        s_dict[s] = 1
    s_dict[s] += 1

max_value = max(s_dict.values())
ans = []
for key, value in s_dict.items():
    if value == max_value:
        ans.append(key)

ans.sort()
for i in ans:
    print(i)