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