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