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