#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<string> v;
  for (int i = 0; i < n; ++i) {
    string s;
    cin >> s;
    v.push_back(s);
  }
  set<string> S(v.begin(), v.end());
  vector<string> names(S.begin(), S.end());
  int cnt0 = count(v.begin(), v.end(), names[0]);
  int cnt1 = count(v.begin(), v.end(), names[1]);
  cout << (cnt0 > cnt1 ? names[0] : names[1]);
  return 0;
}
