# -*- coding: utf-8 -*-
import collections

N = int(input())

all_str = []
for i in range(N):
    str_temp = input()
    all_str.append(str_temp)
all_str.sort()
coll_str = (collections.Counter(all_str))
count_max = 0
j = 0
max_str = coll_str.most_common()
for i in max_str:
    
    num_of_str =  i[1]
    if num_of_str == count_max or j == 0:
        print(i[0])
        j = 1
        count_max = num_of_str
        
    if num_of_str < count_max:
        break import collections collections N = int(input()) N int(input()) int input() input all_str = [] all_str [] for i in range(N):
    str_temp = input()
    all_str.append(str_temp) i range(N) range N str_temp = input() str_temp input() input all_str.append(str_temp) all_str.append all_str append str_temp all_str.sort() all_str.sort all_str sort coll_str = (collections.Counter(all_str)) coll_str collections.Counter(all_str) collections.Counter collections Counter all_str count_max = 0 count_max 0 j = 0 j 0 max_str = coll_str.most_common() max_str coll_str.most_common() coll_str.most_common coll_str most_common for i in max_str:
    
    num_of_str =  i[1]
    if num_of_str == count_max or j == 0:
        print(i[0])
        j = 1
        count_max = num_of_str
        
    if num_of_str < count_max:
        break i max_str num_of_str =  i[1] num_of_str i[1] i 1 if num_of_str == count_max or j == 0:
        print(i[0])
        j = 1
        count_max = num_of_str
        
     num_of_str == count_max or j == 0 num_of_str == count_max num_of_str count_max j == 0 j 0 print(i[0]) print i[0] i 0 j = 1 j 1 count_max = num_of_str count_max num_of_str if num_of_str < count_max:
        break num_of_str < count_max num_of_str count_max break max_str = coll_str.most_common() coll_str.most_common() max_str count_max = num_of_str num_of_str count_max str_temp = input() input() str_temp all_str = [] [] all_str count_max = 0 0 count_max j = 0 0 j j = 1 1 j num_of_str =  i[1] i[1] num_of_str N = int(input()) int(input()) N coll_str = (collections.Counter(all_str)) collections.Counter(all_str) coll_str
# -*- coding: utf-8 -*-
import collections

N = int(input())

all_str = []
for i in range(N):
    str_temp = input()
    all_str.append(str_temp)
all_str.sort()
coll_str = (collections.Counter(all_str))
count_max = 0
j = 0
max_str = coll_str.most_common()
for i in max_str:
    
    num_of_str =  i[1]
    if num_of_str == count_max or j == 0:
        print(i[0])
        j = 1
        count_max = num_of_str
        
    if num_of_str < count_max:
        break
