#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, k1 = 0, k2 = 0;
  cin >> n;
  string a1 = "nothing", a2 = "nothing";
  string s[n];
  for (int i = 0; i < n; ++i) {
    cin >> s[i];
    if (a1 == "nothing" && s[i] != a2)
      a1 = s[i];
    else if (a2 == "nothing" && s[i] != a1)
      a2 = s[i];
  }
  for (int i = 0; i < n; ++i)
    if (s[i] == a1)
      k1++;
    else
      k2++;
  if (k1 > k2)
    cout << a1;
  else
    cout << a2;
  return 0;
}
