#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  long long n;
  cin >> n;
  string second;
  map<string, long long> m;
  for (long long(i) = 0; (i) < (n); (i)++) {
    cin >> second;
    m[second]++;
  }
  long long mx = 0;
  string ans;
  for (auto it : m)
    if (it.second >= mx) {
      mx = it.second;
      ans = it.first;
    }
  cout << ans << "\n";
}
