#include <bits/stdc++.h>
using namespace std;
long long MOD = 1e9 + 7;
string yes = "YES";
string no = "NO";
long long x0r(long long x, long long y) { return (x | y) & (~x | ~y); }
int main() {
  long long n, a = 0, b = 0;
  cin >> n;
  string s1 = "", s2 = "";
  while (n--) {
    string t;
    cin >> t;
    if (s1 == "") {
      s1 = t;
    } else if (s2 == "" && s1 != t) {
      s2 = t;
    }
    if (t == s1)
      a++;
    else
      b++;
  }
  cout << (a > b ? s1 : s2);
}
