#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, c = 0, k = 0;
  string s, s1 = "", s2 = "", ar[10000];
  cin >> n;
  if (n == 1) {
    cin >> s;
    cout << s << endl;
  } else {
    {
      for (int i = 0; i < n; i++) cin >> ar[i];
    }
    for (int i = 0; i < n; i++) {
      s1 += ar[0];
      if (ar[i] == ar[0])
        c++;
      else if (ar[i] != ar[0]) {
        s2 = ar[i];
        k++;
      }
    }
    if (c > k)
      cout << ar[0] << endl;
    else
      cout << s2 << endl;
  }
  return 0;
}
