#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
using ld = long double;
using vi = vector<int>;
using vll = vector<ll>;
using vd = vector<double>;
int ctoi(char c) { return c - '0'; }
int slen(string s) { return s.length(); }
int in() {
  int x;
  cin >> x;
  return x;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int N;
  map<string, int> m;
  cin >> N;
  for (int i = 0; i < N; i++) {
    string s;
    cin >> s;
    m[s]++;
  }
  int mx = -1;
  string w = "";
  for (auto& x : m) {
    if (x.second > mx) {
      mx = x.second;
      w = x.first;
    }
  }
  cout << w << endl;
  return 0;
}
