#include <bits/stdc++.h>
using namespace std;
int a = 1, b, n;
string a1, b1, c;
int main() {
  cin >> n;
  cin >> a1;
  for (int i = 1; i < n; i++) {
    cin >> c;
    if (c != a1)
      b++, b1 = c;
    else
      a++;
  }
  if (a >= b)
    cout << a1;
  else
    cout << b1;
  return 0;
}
