#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 1;
int main() {
  int t;
  cin >> t;
  string s;
  map<string, int> mm;
  while (t--) {
    cin >> s;
    mm[s]++;
  }
  auto ff = *mm.begin();
  auto ss = *mm.rbegin();
  if (ff.second > ss.second)
    cout << ff.first << "\n";
  else
    cout << ss.first << "\n";
  return 0;
}
