#include <bits/stdc++.h>
using namespace std;
int n, one = 1, two;
int main() {
  string s, ss;
  cin >> n >> s;
  for (int i = 0; i < n - 1; i++) {
    string a;
    cin >> a;
    if (a == s)
      one++;
    else {
      two++;
      ss = a;
    }
  }
  if (one > two)
    cout << s << endl;
  else
    cout << ss << endl;
  return 0;
}
