B - Election 解説 /

実行時間制限: 2 sec / メモリ制限: 1024 MB

配点 : 200

問題文

選挙が行われています。

N 人が投票を行い、i\,(1 \leq i \leq N) 番目の人は S_i という名前の候補者に投票しました。

得票数が最大の候補者の名前を答えてください。なお、与えられる入力では得票数が最大の候補者は一意に定まります。

制約

  • 1 \leq N \leq 100
  • S_i は英小文字からなる長さ 1 以上 10 以下の文字列
  • N は整数
  • 得票数が最大の候補者は一意に定まる

入力

入力は以下の形式で標準入力から与えられる。

N
S_1
S_2
\vdots
S_N

出力

得票数が最大の候補者の名前を出力せよ。


入力例 1

5
snuke
snuke
takahashi
takahashi
takahashi

出力例 1

takahashi

takahashi3 票、snuke2 票獲得しました。よって takahashi を出力します。


入力例 2

5
takahashi
takahashi
aoki
takahashi
snuke

出力例 2

takahashi

入力例 3

1
a

出力例 3

a

Score : 200 points

Problem Statement

An election is taking place.

N people voted. The i-th person (1 \leq i \leq N) cast a vote to the candidate named S_i.

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 100
  • S_i is a string of length between 1 and 10 (inclusive) consisting of lowercase English letters.
  • N is an integer.
  • There is a unique candidate with the most votes.

Input

Input is given from Standard Input in the following format:

N
S_1
S_2
\vdots
S_N

Output

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


Sample Input 1

5
snuke
snuke
takahashi
takahashi
takahashi

Sample Output 1

takahashi

takahashi got 3 votes, and snuke got 2, so we print takahashi.


Sample Input 2

5
takahashi
takahashi
aoki
takahashi
snuke

Sample Output 2

takahashi

Sample Input 3

1
a

Sample Output 3

a