#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  unordered_map<string, int> m;
  string s;
  for (int i = 0; i < n; i++) {
    cin >> s;
    m[s]++;
  }
  int ans = 0;
  string name;
  for (auto x : m) {
    if (ans < x.second) {
      ans = x.second;
      name = x.first;
    }
  }
  cout << name;
  return 0;
}
