#include <bits/stdc++.h>
using namespace std;
int main(void) {
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  map<string, int> m;
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    m[s] += 1;
  }
  string top;
  int top_score = 0;
  for (__typeof((m).begin()) it = (m).begin(); it != (m).end(); ++it) {
    if (it->second > top_score) {
      top = it->first;
      top_score = it->second;
    }
  }
  cout << top << endl;
  return 0;
}
