#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define Would #define you const int INF = 999999999; const int MOD = 1e9 + 7; const double pi = 3.141592653589793238; int n, ans, cou; bool rentyon[105]; int main() { cin >> n; string h; for (int i = 0; i < n; ++i) { for (int j = 0; j < n; ++j) { cin >> h; if (h == "nyanpass") { rentyon[j - 1] = 1; } } } for (int i = 0; i < n; ++i) { if (rentyon[i]) { ++cou; ans = i; } } if (cou == 1) { cout << ans << endl; } else { cout << -1 << endl; } }