#include #include int main (void) { unsigned N; scanf("%d", &N); char *A; int s[100] = {0}; // int *s = calloc(N, (unsigned)sizeof(int)); int renchon = 0; int n; int i, j; for (i = 0; i < N; i++) { for (j = 0; j < N; j++) { scanf("%s", A); if (strcmp(A, "nyanpass") == 0) s[j]++; } } for (j = 0; j < N; j++) { if (s[j] == N - 1) renchon++; n = j; } if (renchon != 1) printf("-1"); else printf("%d", n + 1); // free(s); return 0; }