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