Codeforces Beta Round 42(Div. 2)
A
足球
Football
Codeforces
1000
原题
←B →

足球AI (CI翻译)

One day Vasya decided to have a look at the results of Berland 1910 Football Championship’s finals. Unfortunately he didn't find the overall score of the match; however, he got hold of a profound description of the match's process. On the whole there are $*n*$ lines in that description each of which described one goal. Every goal was marked with the name of the team that had scored it. Help Vasya, learn the name of the team that won the finals. It is guaranteed that the match did not end in a tie.

某一天,Vasya 想查看别尔兰 1910 年足球锦标赛决赛的结果。不巧的是,他没找到比赛的总比分,不过拿到了一份详细的比赛过程记录。记录共包含 $*n*$ 行,每行描述了一个进球,并注明了进球队伍的名称。请帮助 Vasya 找出赢得决赛的队伍。保证比赛没有以平局结束。AI (CI翻译)

Input

输入格式

AI (CI翻译)

The first line contains an integer $*n*$ ($1 ≤ *n* ≤ 100$) — the number of lines in the description. Then follow $*n*$ lines — for each goal the names of the teams that scored it. The names are non-empty lines consisting of uppercase Latin letters whose lengths do not exceed 10 symbols. It is guaranteed that the match did not end in a tie and the description contains no more than two different teams.

第一行包含一个整数 $*n*$($1 ≤ *n* ≤ 100$),表示记录的行数。接下来 $*n*$ 行,每行给出一个进球的进球队伍名称。队伍名称由非空的大写拉丁字母串构成,长度不超过 10 个字符。保证比赛没有以平局结束,且记录中最多出现两支不同的队伍。AI (CI翻译)

Output

输出格式

AI (CI翻译)

Print the name of the winning team. We remind you that in football the team that scores more goals is considered the winner.

输出获胜队伍的名称。提醒:在足球比赛中,进球数更多的队伍获胜。AI (CI翻译)

样例

Input #1
1
ABC
Output #1
ABC
InputCopy OutputCopy
Input #2
5
A
ABA
ABA
A
A
Output #2
A
InputCopy OutputCopy
题目信息
题号
43A
时间限制
2 s
内存限制
256 MB
标签
字符串

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(gpt-6.1-sol),如有出入请以原文为准。