#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s, s1, s2;
  cin >> s1;
  int t1 = 1, t2 = 0;
  for (int i = 1; i < n; i++) {
    cin >> s;
    if (s == s1)
      t1++;
    else {
      s2 = s;
      t2++;
    }
  }
  if (t1 > t2)
    cout << s1;
  else
    cout << s2;
}
