#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, i, mx = 0;
  cin >> t;
  string s, ss;
  map<string, int> mp;
  for (i = 0; i < t; i++) cin >> s, mp[s]++;
  for (auto &i : mp)
    if (i.second > mx) mx = i.second, ss = i.first;
  cout << ss << endl;
  return 0;
}
