One day Vasya decided to have a look at the results of Berland 1910 Football Championship’s finals. Unfortunately he didn't find the overall score of the match; however, he got hold of a profound description of the match's process. On the whole there are *n* lines in that description each of which described one goal. Every goal was marked with the name of the team that had scored it. Help Vasya, learn the name of the team that won the finals. It is guaranteed that the match did not end in a tie.
The first line contains an integer *n* (1 ≤ *n* ≤ 100) — the number of lines in the description. Then follow *n* lines — for each goal the names of the teams that scored it. The names are non-empty lines consisting of uppercase Latin letters whose lengths do not exceed 10 symbols. It is guaranteed that the match did not end in a tie and the description contains no more than two different teams.
import math
from collections import Counter
def get():
        return list(map(int, input().split()))
def intput():
        return int(input())
def  countSetBits(n):
        count = 0
        while (n):
            count += n & 1
            n >>= 1
        return count
def can(i,n):
            big = i * n[0]
            small = i + n[0] - 1
            w = big // n[1] * n[1]
            if (big >= w and w >= small):
                return True
            return False
def dw(a,b,c):
    v = [*a,*b,*c]  # The coordinates
    print(v)
    if (len(v) == 6):
        # Calculate the area using the determinant formula
        A = 0.0
        A = abs(0.5 * (v[0] * v[3] + v[1] * v[4] + v[2] * v[5] -
                       v[3] * v[4] - v[0] * v[5] - v[1] * v[2]))
        return A
    else:
        # If length != 6, quit with a message
        print('\nYou must enter six coordinates.')
def lcs_algo(S1, S2, m, n):
    l=[[0 for _ in range(n+1)] for _ in range(m+1)]
    for r in range(m+1):
        for c in range(n+1):
            if (c==0 or r==0):
                continue
            elif (S1[r-1]==S2   [c-1]):
                          l[r][c]=l[r-1][c-1]+1
            else:
                l[r][c]=max(l[r-1][c],l[r][c-1])
    id=l[m][n]
    j=m
    i=n
    s=['' for _ in range(id+1) ]
    while j>0 and i>0:
        if (S2[i-1]==S1[j-1]):
            s[id]=S1[j-1]
            j-=1
            i-=1
            id-=1
        elif (l[j][i-1]>l[j-1][i]):
            i=-1
        else:
            j-=1

    return ''.join(s[1:])
def seive (s):
    vis=[False for i in  range(s+10)]
    prem=[]
    for i in range(2,s):
        if (not vis[i]):
            prem.append(i)
            n=i*2
            while (n<=s):
                vis[n]=True
                n+=i
                print(n)
    print(prem)
def main():
    d=dict()
    for _ in range(intput()):
        i =input()
        if (i in d):
            d[i]=d[i]+1
        else:
            d[i]=1
    e=sorted(d,key=lambda x:d[x])
    print(e[-1])
main()