P23691 [AtCoder] [ABC008B] Voting
普及-
题目描述

Problem Description

In a certain organization, an election was held to elect a leader.

The organization consists of $ N $ members, and each member wrote down the name of the person they think is most suitable to be the leader.

The leader is the person with the most votes.

Output the name of the person with the most votes. If there are multiple people with the most votes, you may output any one of their names.

Input Format

The input is given from the standard input in the following format:

$ N $ $ S_1 $ $ S_2 $ : $ S_N $

  • The first line contains an integer $N\ (1\ ≦\ N\ ≦\ 50)$, representing the number of members in the organization.
  • From the second line to the $ N $th line, each line represents the voting content of each member. The $i\ (1\ ≦\ i\ ≦\ N)$th line contains a string $ S_i $, which represents the voting content of the $ i $th person. $ S_i $ consists only of lowercase English letters and has a length between $ 1 $ and $ 50 $ characters inclusive.

Output Format

Output the name of the person with the most votes. If there are multiple people with the most votes, you may output any one of their names. Ensure a newline at the end of the output.

Sample Input and Output

Sample Input #1

4
taro
jiro
taro
saburo

Sample Output #1

taro

Sample Input #2

1
takahashikun

Sample Output #2

takahashikun

Sample Input #3

9
a
b
c
c
b
c
b
d
e

Sample Output #3

b

Notes/Hints

Sample Explanation 1

taro received $ 2 $ votes, while jiro and saburo each received $ 1 $ vote.

Sample Explanation 2

There are no votes other than takahashikun.

Sample Explanation 3

b received the most votes with $ 3 $, but c also received $ 3 $ votes, so outputting c would also be correct.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
4 taro jiro taro saburo
样例输出
taro