#include <bits/stdc++.h>
int main(void) {
  int i, a, n = 0, d = 0, x, j = 0, index;
  char arr[100][11], c, str[11], std[11];
  scanf("%d", &a);
  scanf("%c", &c);
  for (i = 0; i < a; i++) gets(arr[i]);
  for (i = 0; i < a; i++) {
    if (strcmp(arr[j], arr[i]) == 0 || a == 1)
      n++;
    else {
      index = i;
      d++;
    }
  }
  if (n > d)
    printf("%s ", arr[0]);
  else
    printf("%s", arr[index]);
  return 0;
}
