#include using namespace std; int main(){ int N; cin >> N; bool if_nyantyon[N]; for(int i = 0; i < N; i++){ if_nyantyon[i] = true; } for(int i = 0; i < N; i++){ for(int j = 0; j < N; j++){ string hello; cin >> hello; if(hello != "nyanpass" && hello != "-"){ if_nyantyon[j] = false; } } } int ans = -1; for(int i = 0; i < N; i++){ if(if_nyantyon[i]){ if(ans == -1){ ans = i + 1; }else{ cout << -1 << endl; return 0; } } } cout << ans << endl; }