#include using namespace std; int main(){ int N; cin >> N; string nyan[N][N]; int cnt = 0; int key1, key2, key3; for(int i=0; i> nyan[i][j]; if(nyan[i][j] == "nyanpass"){ cnt++; if(i == 0) key1 = j+1; if(i == 1) key2 = j+1; if(i == 2) key3 = j+1; } } } if(cnt != N) { cout << -1 << endl; }else{ if((key1 == key2) || (key3 == key2)){ cout << key2 << endl; }else if((key1 == key3)){ cout << key1 << endl; } } return 0; }