#include <bits/stdc++.h>
using namespace std;
long long mod = 1000000007;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long n;
  cin >> n;
  string team;
  unordered_map<string, int> football;
  while (n--) {
    cin >> team;
    football[team]++;
  }
  unordered_map<string, int>::iterator it;
  int curr = 0;
  for (auto i = football.begin(); i != football.end(); i++) {
    if (curr < (*i).second) {
      curr = (*i).second;
      team = (*i).first;
    }
  }
  cout << team;
  return 0;
}
