<reponame>kagemeka/atcoder-submissions
import collections
import typing


def main() -> typing.NoReturn:
    n = int(input())
    s = [input() for _ in range(n)]
    count = sorted(collections.Counter(s).items(), key=lambda x: -x[1])
    print(count[0][0])

main()

import collections
import typing


def main() -> typing.NoReturn:
    n = int(input())
    s = [input() for _ in range(n)]
    count = sorted(collections.Counter(s).items(), key=lambda x: -x[1])
    print(count[0][0])

main()