#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<string> v;
  string x;
  for (int i = 0; i < n; ++i) {
    cin >> x;
    v.push_back(x);
  }
  sort(v.begin(), v.end());
  int c1 = count(v.begin(), v.end(), v[0]);
  int c2 = count(v.begin(), v.end(), v.back());
  if (c1 > c2) {
    cout << v[0];
  } else {
    cout << v.back();
  }
  return 0;
}
