#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int count1 = 0, count2 = 0;
  string str[n], str2;
  for (int i = 0; i < n; i++) {
    cin >> str[i];
    if (str[i] == str[0])
      count1++;
    else {
      str2 = str[i];
      count2++;
    }
  }
  if (count2 > count1)
    cout << str2;
  else
    cout << str[0];
}
