#include <bits/stdc++.h>
using namespace std;
bool isUpperCase(char c) { return c >= 'A' && c <= 'Z'; }
bool isLowerCase(char c) { return c >= 'a' && c <= 'z'; }
bool isLetter(char c) { return c >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z'; }
bool isDigit(char c) { return c >= '0' && c <= '9'; }
char toLowerCase(char c) { return (isUpperCase(c)) ? (c + 32) : c; }
char toUpperCase(char c) { return (isLowerCase(c)) ? (c - 32) : c; }
template <class T>
inline T MAX(T a, T b) {
  return a > b ? a : b;
}
template <class T>
inline T MIN(T a, T b) {
  return a < b ? a : b;
}
template <class T>
inline void SWAP(T &a, T &b) {
  a = a ^ b;
  b = a ^ b;
  a = a ^ b;
}
template <class T, class T1>
inline void Reverse(T1 A[], T i, T j) {
  for (; i < j; i++, j--) SWAP(A[i], A[j]);
}
template <class T>
inline T fAbs(T a) {
  return a < 0 ? a * (-1) : a;
}
template <class T>
inline T GCD(T a, T b) {
  if (a < 0) return GCD(-a, b);
  if (b < 0) return GCD(a, -b);
  while (b) {
    b ^= a ^= b ^= a %= b;
  }
  return a;
}
template <class T>
inline T LCM(T a, T b) {
  return a / GCD(a, b) * b;
}
int main() {
  string s[2], t;
  int n, l, a = 0, b = 0;
  cin >> n;
  cin >> s[0];
  a++;
  for (l = 1; l < n; l++) {
    cin >> t;
    if (s[0] == t)
      a++;
    else {
      s[1] = t;
      b++;
    }
  }
  if (a > b)
    cout << s[0];
  else
    cout << s[1];
  return 0;
}
