#include <bits/stdc++.h>
using namespace std;
signed main() {
  (ios_base::sync_with_stdio(false), cin.tie(NULL));
  long long t, k1 = 1, k2 = 0;
  cin >> t;
  string s, s1, s2;
  cin >> s;
  s1 = s;
  for (long long i = 1; i < t; i++) {
    cin >> s;
    if (s1 == s)
      k1++;
    else
      k2++, s2 = s;
  }
  cout << (k1 > k2 ? s1 : s2);
}
