#include <bits/stdc++.h>
int main() {
  int n, i, count = 1, m, Z, y;
  scanf("%d", &n);
  char x[100], a[100], s[100];
  scanf("%s", a);
  for (i = 0; i < n - 1; i++) {
    scanf("%s", x);
    m = strcmp(a, x);
    if (m == 0) {
      count++;
    } else {
      strcpy(s, x);
    }
  }
  y = n - count;
  if (count > y) {
    printf("%s\n", a);
  } else if (count < y) {
    printf("%s\n", s);
  }
}
