#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  map<string, int> m;
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    string s;
    cin >> s;
    m[s]++;
  }
  int mx = 0;
  string ans;
  for (auto x : m) {
    if (x.second > mx) {
      mx = x.second;
      ans = x.first;
    }
  }
  cout << ans << endl;
  return 0;
}
