#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<string> v;
  int cnt1 = 0, cnt2 = 0;
  int n;
  cin >> n;
  string d;
  string s, t;
  for (int i = 0; i < n; i++) {
    cin >> s;
    v.push_back(s);
  }
  for (int i = 1; i < v.size(); i++) {
    if (v[0] == v[i]) {
      cnt1++;
    } else {
      cnt2++;
      d = v[i];
    }
  }
  if (cnt1 + 1 > cnt2) {
    cout << v[0];
  } else {
    cout << d;
  }
}
