#include <bits/stdc++.h>
int main() {
  char ax[105], bx[105], cx[105][1000];
  int i, j, count1 = 0, count2 = 0, n;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%s", cx[i]);
  }
  for (i = 0; i < n; i++) {
    j = strcmp(cx[0], cx[i]);
    if (j == 0) {
      strcpy(ax, cx[i]);
      count1++;
    } else {
      strcpy(bx, cx[i]);
      count2++;
    }
  }
  if (count1 > count2)
    printf("%s", ax);
  else
    printf("%s", bx);
}
