https://www.acmicpc.net/problem/1302
import sys
input = sys.stdin.readline
num = int(input())
dict = {}
dict2= {}
for _ in range(num):
book = input().rstrip('\n')
if book in dict:
dict[book] += 1
else:
dict[book] = 1
dict2= sorted(dict.items())
max_cnt = 0
max_name = ''
for i in range(len(dict2)):
if dict2[i][1]>max_cnt:
max_cnt = dict2[i][1]
max_name = dict2[i][0]
print(max_name)