atcoder#ABC231B. [ABC231B] Election
[ABC231B] Election
Score : points
Problem Statement
An election is taking place.
people voted. The -th person cast a vote to the candidate named .
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
- is a string of length between and (inclusive) consisting of lowercase English letters.
- is an integer.
- There is a unique candidate with the most votes.
Input
Input is given from Standard Input in the following format:
Output
Print the name of the candidate who received the most votes.
5
snuke
snuke
takahashi
takahashi
takahashi
takahashi
takahashi
got votes, and snuke
got , so we print takahashi
.
5
takahashi
takahashi
aoki
takahashi
snuke
takahashi
1
a
a