#include using namespace std; int main() { int n; string a[100][100], b[100][100]; bool isRenchon; int renchon = -1; cin >> n; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { cin >> a[i][j]; } } for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { b[j][i] = a[i][j]; } } for (int i = 0; i < n; i++) { isRenchon = true; for (int j = 0; j < n; j++) { if (b[i][j].compare("nyanpass") == 0 || b[i][j].compare("-") == 0) { isRenchon &= true; } else { isRenchon &= false; } } if (isRenchon) { if (renchon < 0) { renchon = i + 1; } else { renchon = -1; break; } } } cout << renchon << endl; return 0; }