#include <iostream>
#include <map>
using namespace std;
int main()
{
int n;
char s[100];
while(cin>>n)
{
if(n==0)
return 0;
map<string ,int>map1;
map<string ,int>::iterator p;
for(int i=0;i<n;i++)
{
cin>>s;
map1[s]++;
}
int tem=0;
string ans;
for(p=map1.begin();p!=map1.end();p++)
{
if(tem<p->second)
{
tem=p->second;
ans=p->first;
}
//cout<<ans<<endl;
}
cout<<ans<<endl;
}
return 0;
}
Sample Input
5 green red blue red red 3 pink orange pink 0
Sample Output
red pink