#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  map<string, int> mp;
  string s;
  for (int i = 0; i < n; i++) {
    cin >> s;
    mp[s]++;
  }
  int max = 0;
  string res = "";
  for (auto it = mp.begin(); it != mp.end(); it++) {
    if (it->second > max) {
      max = it->second;
      res = it->first;
    }
  }
  cout << res << endl;
}
int main() {
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
