#include<iostream> #include<cstdio> #include<map> #include<string> #include<cstring> using namespace std; void solve() { int T, max, t; map<string, int> color_count; string color; while(cin>>T && T) { max = 0; while(T--) { cin>>color; ++color_count[color]; } map<string, int>::const_iterator ii, it; it = color_count.begin(); while(it != color_count.end()) { if(max < it->second) { max = it->second; ii = it; } it++; } cout<<ii->first<<endl; color_count.clear(); } } int main() { solve(); return 0; }