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