#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, n, j;
  string s;
  vector<string> first;
  vector<string> second;
  cin >> n;
  cin >> s;
  first.push_back(s);
  for (i = 1; i < n; ++i) {
    cin >> s;
    if (s != first[0])
      second.push_back(s);
    else
      first.push_back(s);
  }
  if (first.size() > second.size())
    cout << first[0];
  else
    cout << second[0];
  return 0;
}
