#include <bits/stdc++.h>
using namespace std;
bool yes(int x, int y1, int z) {
  int y, s = 0;
  while (x > 0) {
    y = x % 10;
    s += y;
    x -= y;
    x /= 10;
  }
  if (s >= y1 && s <= z)
    return 1;
  else
    return 0;
}
int i = 1, i2 = 1;
void rec(int x) {
  if (i2 == x)
    cout << i;
  else {
    cout << i2 << endl;
    i2++;
    rec(i + 1);
  }
}
bool is(int x) {
  int z;
  while (x > 0) {
    z = x % 10;
    x -= z;
    x = x / 10;
    if (z != 4 && z != 7) return false;
  }
  return true;
}
const int width = 30;
bool prime(int x) {
  for (int i = 2; i < x; i++) {
    if (x % i == 0) return false;
  }
  return true;
}
const int height = 20;
bool gameover = 0;
const char char_max = (char)(((unsigned char)char(-1)) / 2);
int main() {
  int x, c1 = 0, c2 = 0;
  string s1 = "", s2 = "", s3;
  cin >> x;
  bool f = false;
  for (int i = 0; i < x; i++) {
    cin >> s3;
    if (i == 0) {
      s1 += s3;
    }
    if (s1 == s3) {
      c1++;
    }
    if (s1 != s3 && s3 != s2) {
      s2 += s3;
    }
    if (s2 == s3) {
      c2++;
    }
  }
  if (c1 > c2)
    cout << s1;
  else
    cout << s2;
  return 0;
}
