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