#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  string s;
  pair<string, int> s1;
  pair<string, int> s2;
  cin >> s;
  s1.first = s;
  s1.second = 1;
  n--;
  s2.second = 0;
  while (n--) {
    cin >> s;
    if (s == s1.first)
      s1.second++;
    else {
      s2.first = s;
      s2.second++;
    }
  }
  if (s1.second > s2.second)
    cout << s1.first << endl;
  else
    cout << s2.first << endl;
  return 0;
}
