#include<iostream>
#include<map>
#include<string>
using namespace std;
const int N=1e5+10;
int n;
map<string,int> mp;
int main()
{
cin>>n;
for(int i=0;i<n;i++)
{
string pp;
cin>>pp;
mp[pp]++;
}
string str;
mp[str] = -2e9;
for(auto [x,y]:mp)
{
if(mp[x]>mp[str]) str = x;
}
cout<<str;
return 0;
}