#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, c1 = 1, c2 = 0, d;
  char str[15], un1[15], un2[15];
  cin >> n;
  cin >> str;
  strcpy(un1, str);
  for (i = 2; i <= n; i++) {
    cin >> str;
    d = strcmp(un1, str);
    if (d == 0) {
      c1++;
    } else {
      c2++;
      strcpy(un2, str);
    }
  }
  if (c1 > c2) {
    cout << un1 << endl;
  } else if (c2 > c1) {
    cout << un2 << endl;
  }
  return 0;
}
