#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x = 1, y = 0;
  string s, a, b;
  cin >> n;
  cin >> s;
  a = s;
  for (int i = 1; i < n; i++) {
    cin >> s;
    if (s == a)
      x++;
    else if (s == b)
      y++;
    else {
      b = s;
      y++;
    }
  }
  if (x > y)
    cout << a;
  else
    cout << b;
  return 0;
}
