Time limit
2s
Memory limit
128 MB
A bookstore employee wants to record which book title sold the most during the day.
Given the titles of all books sold today, write a program that prints the title with the highest sales count.
The first line contains the number of books sold today, N. N is a natural number no greater than 1,000.
Each of the next N lines contains one book title. Every title has length at most 50 and consists only of lowercase English letters.
Print the title of the book sold the most times on the first line.
If multiple titles are tied for the highest count, print the lexicographically smallest one.