#include <bits/stdc++.h>
using namespace std;
map<string, int> m;
map<string, int>::iterator p, q;
int main() {
  int k = 0;
  int j, n, i, t;
  char s[20];
  cin >> t;
  m.clear();
  while (t--) {
    cin >> s;
    m[s]++;
  }
  int max = 0;
  for (p = m.begin(); p != m.end(); p++) {
    if (p->second > max) {
      max = p->second;
      q = p;
    }
  }
  cout << q->first;
  return 0;
}
