import java.util.*; public class Main{ public static void main(String[] args){ int n = new Scanner(System.in).nextInt(); int nyanCount = 0; int humanNumber = -1; String[][] greet = new String[n][n]; for(int i = 0; i <= n-1;i++){ for(int j = 0; j <= n-1;j++){ greet[i][j] = new Scanner(System.in).nextLine(); if("nyanpass".equals(greet[i][j])){ nyanCount = 1; humanNumber = j; break; } } if(nyanCount == 1){ break; } } System.out.println(humanNumber++); } }