#include <bits/stdc++.h>
using namespace std;
bool isPrime(int n) {
  if (n == 1) return false;
  if (n == 2) return true;
  for (int i = 2; i * i <= n; i++) {
    if (n % i == 0) return false;
  }
  return true;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  cin >> n;
  int cnt1 = 1, cnt2 = 0;
  string first = "";
  cin >> first;
  string second = "";
  for (int i = 0; i < n - 1; i++) {
    string s = "";
    cin >> s;
    if (s == first)
      cnt1++;
    else {
      second = s;
      cnt2++;
    }
  }
  if (cnt1 > cnt2)
    cout << first << "\n";
  else
    cout << second << "\n";
  return 0;
}
