#include<string>
#include<iostream>
#include<unordered_map>
#include<algorithm>
using namespace std;
int main(){
int n;
string s;
while(cin >> n){
if(!n) break;
int ans = 0;
unordered_map<string , int> mp;
string res;
for(int i = 0; i < n; i++){
cin >> s;
mp[s]++;
if(mp[s] > ans ){
ans = mp[s];
res = s;
}
}
cout<<res<<endl;
}
return 0;
}
ZOJ2104 Let the Balloon Rise
最新推荐文章于 2020-08-21 23:37:45 发布