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