@staticmethod
def b():
    (n, *s) = sys.stdin.read().split()
    res = defaultdict(int)
    for name in s:
        res[name] += 1
    print(sorted(res.items(), key=(lambda x: x[1]))[(- 1)][0])
@staticmethod
def b():
    (n, *s) = sys.stdin.read().split()
    res = defaultdict(int)
    for name in s:
        res[name] += 1
    print(sorted(res.items(), key=(lambda x: x[1]))[(- 1)][0])