IITKESO207PA4Q2 - Favourite Word

After finally becoming friends, Mahesh and Nitish now talk frequently with each other. While talking to Mahesh, Nitish notices that he uses a certain word more than others. Therefore, Nitish decides to carry out his own experiment. Nitish has given you a part of Mahesh's speech (a set of words used by Mahesh) and has asked you to find out Mahesh's favourite word. We define Mahesh's favourite word as the word he uses most. You are guaranteed that there is a unique favourite word. Mahesh speaks a weird language in which a word is simply a string of lowercase characters. You are given that no word is more than 100 characters long.

Input

The first line of input is an integer n which denotes the total number of words spoken by Mahesh. (n <= 100000)
The following n lines contain the words.

Output

In each case, output Mahesh's favourite word.

Example

Input:
10
mvhwh
pwqrqiv
jsckgbd
uzwlnuaus
nxazv
jsckgbd
mvhwh
nvjsnj
bngbwo
mvhwh Output: mvhwh

Added by:Programming Club, IITK
Date:2018-03-10
Time limit:1s-1.200s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All

hide comments
2018-03-11 07:57:55 Programming Club, IITK
wisfaq: Fixed. Thanks. :)
2018-03-10 22:01:48 wisfaq
In the example there are 10 words, not 9.
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.