#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  map<string, int> ma;
  while (n--) {
    string temp;
    cin >> temp;
    ma[temp]++;
  }
  int x = 0;
  string y = "";
  for (auto &e : ma) {
    if (x < e.second) {
      y = e.first;
      x = e.second;
    }
  }
  cout << y << "\n";
}
