#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  cin >> n;
  unordered_map<string, int> m;
  while (n--) {
    string s;
    cin >> s;
    if (m.count(s) == 0)
      m[s] = 1;
    else
      m[s]++;
  }
  long long int maxx = INT_MIN;
  string ans;
  for (auto p : m) {
    if (maxx < p.second) {
      maxx = p.second;
      ans = p.first;
    }
  }
  cout << ans;
}
