c++编程
#include<istream>#include<map>
using namespace std;
int main(void)
{
int n;
while(cin>>n && n)
{
map<string,int>balloon;
string s;
for(int i=0;i<n;i++)
{
cin>>s;
ballon[s]++;
}
int imax=0;
map<string,int>::iterator point ,loc;
for(point=balloon.begin();point!=balloon.end();point++)
if (imax<point->second)
{
imax=point->second;
loc=point;
}
cout<<loc->first<<endl;
}
return 0;
}