#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  int mn = n;
  vector<string> v;
  string f = "", s = "";
  while (n--) {
    string team;
    cin >> team;
    v.push_back(team);
    if (f == "")
      f = team;
    else if (team != f)
      s = team;
  }
  if (v.size() == 1) {
    cout << v[0] << "\n";
    return;
  }
  int first = count(begin(v), end(v), v[0]);
  int second = mn - first;
  if (first > second) {
    cout << v[0];
  } else
    cout << s;
  cout << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  solve();
  return 0;
}
