#include <bits/stdc++.h>
using namespace std;
int arr[2];
int main() {
  int n, n1;
  cin >> n;
  n1 = n;
  string s, s1, s2;
  cin >> s;
  arr[0]++;
  n--;
  while (n--) {
    cin >> s1;
    if (s1 == s)
      arr[0]++;
    else
      s2 = s1;
  }
  if (arr[0] > (n1 / 2))
    cout << s;
  else
    cout << s2;
}
