#include <bits/stdc++.h>
using namespace std;
const int mode = 1000000007;
const double PI = acos(-1);
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int i, j, k, m, x, y, sum = 0, n, size, q, l = 0, r, mid, flag = 0,
                                  Max = INT_MIN;
  string s;
  cin >> n;
  map<string, long long int> mp;
  for (i = 0; i < n; i++) {
    cin >> s;
    mp[s]++;
  }
  for (auto &i : mp) {
    Max = max(Max, i.second);
  }
  string key;
  for (auto &j : mp) {
    if (j.second == Max) {
      key = j.first;
      break;
    }
  }
  cout << key << endl;
  return 0;
}
