#include #include #include #define rep(i,n) for(i=0; i> n; int i,j; int renchon[100]={0}; string s; rep(i,n) { rep(j,n) { cin >> s; if(s=="nyanpass") { renchon[j+1]++; } } } int cnt=0,specific=0; for(i=0;i<100;i++){ if(renchon[i]==n-1){ cnt++; specific=i; } } if(cnt!=1) { cout << -1 << endl; } else if(specific!=0) { cout << specific << endl; } else { cout << -1 << endl; } return 0; }