#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  string s;
  map<string, int> m;
  for (int i = 0; i < n; i++) {
    cin >> s;
    m[s]++;
  }
  map<string, int>::iterator it;
  for (it = m.begin(); it != m.end(); it++) {
    if (it->second > n / 2) cout << it->first << endl;
  }
  return 0;
}
