#include <bits/stdc++.h>
using namespace std;
int main() {
  string s1, s, s2;
  int n, k;
  cin >> n;
  k = n;
  vector<string> v;
  while (n--) {
    cin >> s1;
    v.push_back(s1);
  }
  std::vector<string>::iterator upper1, upper2;
  sort(v.begin(), v.end());
  upper1 = std::upper_bound(v.begin(), v.end(), v[0]);
  if (upper1 - v.begin() >= k / 2 + 1)
    cout << v[0];
  else
    cout << v[k - 1];
  return 0;
}
