Problem2257--Election

2257: Election

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MB

Description

Time Limit: 2 sec / Memory Limit: 1024 MB
Score : 200200 points

Problem Statement

An election is taking place.
NN people voted. The ii-th person (1 \leq i \leq N)(1iN) cast a vote to the candidate named S_iSi.
Find the name of the candidate who received the most votes. The given input guarantees that there is a unique candidate with the most votes.

Constraints

  • 1 \leq N \leq 1001N100
  • S_iSi is a string of length between 11 and 1010 (inclusive) consisting of lowercase English letters.
  • NN is an integer.
  • There is a unique candidate with the most votes.

Input

Input is given from Standard Input in the following format:
NN
S_1S1
S_2S2
\vdots
S_NSN

Output

Print the name of the candidate who received the most votes.


Sample Input Copy

5
snuke
snuke
takahashi
takahashi
takahashi

Sample Output Copy

takahashi

HINT

takahashi got 33 votes, and snuke got 22, so we print takahashi.

Source/Category