#include<bits/stdc++.h>
#include<cstring>
using namespace std;
struct dc{
string c;
int cp;
}a[105];
char s[50];
int n,f=1;
bool t;
bool cmp(dc x,dc y){
return x.cp>y.cp;
}
int main(){
cin>>n;
for(int i=1;i<=n;i++){
cin>>s;
strlwr(s);
t=true;
for(int j=1;j<=f;j++){
if(s==a[j].c){
a[j].cp++;
t=false;
}
}
if(t){
a[f].c=s;
a[f].cp=1;
f++;
}
}
sort(a+1,a+1+n,cmp);
cout<<a[1].c;
return 0;
}