//yukicoder No.239 にゃんぱすー #include #include #include #include using namespace std; const int MAX_N = 100; #define rep(i,n) for(int i=0;i>n; int ans; string a[MAX_N][MAX_N]; rep(i,n){ //input rep(j,n){ cin>>a[i][j]; } } rep(i,n){ //summer rep(j,n){ if(a[i][j]=="nyanpass"){ if(ans==i-1){ ans=-1; break; } ans=i-1; } } } if(ans==0){ cout<<"-1"<