#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, i, cs1, cs2;
  cin >> n;
  cs1 = cs2 = 0;
  string s1, s2;
  vector<string> s;
  string temp;
  cin >> temp;
  s.push_back(temp);
  s1 = s[0];
  for (i = 0; i < n - 1; i++) {
    cin >> temp;
    s.push_back(temp);
    if (temp != s1) {
      s2 = temp;
    }
  }
  for (i = 0; i < n; i++) {
    if (s[i] == s1) {
      cs1++;
    } else {
      cs2++;
    }
  }
  if (cs1 > cs2) {
    cout << s1 << endl;
  } else {
    cout << s2 << endl;
  }
}
