#include <bits/stdc++.h>
using namespace std;
char ch[100];
string s;
map<string, int> mp;
int main() {
  int i, ma = -1, n;
  mp.clear();
  scanf("%d", &n);
  for (i = 0; i < n; ++i) {
    scanf("%s", ch);
    s = ch;
    if (mp.count(s) == 0)
      mp[s] = 1;
    else
      mp[s]++;
  }
  map<string, int>::iterator p;
  for (p = mp.begin(); p != mp.end(); p++) {
    if ((*p).second > ma) {
      ma = (*p).second;
      s = (*p).first;
    }
  }
  printf("%s\n", s.c_str());
  return 0;
}
