#include #include #include void main(void){ int n; scanf("%d",&n); int greetingList[100] = {}; //int *greetingList = (int *)calloc(n,sizeof(int)); for(int i = 0 ; i < n ; i ++){ for(int j = 0 ; j < n ; j++){ char greeting[100] = "a"; scanf("%s",greeting); if(strcmp(greeting,"nyanpass") == 0){ //(greetingList+j) = (greetingList+j) + 1; greetingList[j]++; } } } int particular = 0,count = 0; for(int i = 0 ; i < n ; i++){ if(greetingList[i] == n-1){ particular = i+1; count++; } if(count > 1){ break; } } if(count == 1){ printf("%d",particular); }else{ printf("-1"); } }