#include <bits/stdc++.h>
using namespace std;
int main() {
  string str1, str2, temp;
  int n, a = 1, b = 0;
  cin >> n;
  cin >> str1;
  for (int i = 0; i < n - 1; i++) {
    cin >> temp;
    if (temp == str1)
      a++;
    else {
      str2 = temp;
      b++;
    }
  }
  cout << (a > b ? str1 : str2);
  return 0;
}
