#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long int n, max = 0;
  cin >> n;
  map<string, long long int> m;
  string s;
  while (n--) {
    cin >> s;
    m[s]++;
  }
  for (auto it = m.begin(); it != m.end(); it++) {
    if (it->second > max) {
      max = it->second;
      s = it->first;
    }
  }
  cout << s << endl;
}
