#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  string s1;
  int r = 1, r1 = 0;
  string s2;
  for (int k = 1; k < n; k++) {
    cin >> s1;
    if (s1 == s)
      r++;
    else {
      s2 = s1;
      r1++;
    }
  }
  if (r > r1)
    cout << s;
  else
    cout << s2;
  return 0;
}
