#include <bits/stdc++.h>
using namespace std;
map<string, int> mp;
set<string> s;
set<string>::const_iterator it;
int main() {
  int n;
  string x;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x;
    mp[x]++;
    s.insert(x);
  }
  it = s.begin();
  it++;
  if (it == s.end()) {
    cout << *s.begin();
    return 0;
  }
  string a = *s.begin(), b = *it;
  if (mp[a] > mp[b])
    cout << a;
  else
    cout << b;
  return 0;
}
