using System; using System.Collections.Generic; using System.Linq; public static class Program { const string NYANPASS = "nyanpass"; static void Main(string[] args) { int N = int.Parse(Console.ReadLine()); var matrix = new string[N, N]; // 行列生成 string[] line; for (int i=0; i(); int counter = 0; for (int i = 0; i < N; i++) { counter = 0; for (int j = 0; j < N; j++) { if (matrix[j, i] == NYANPASS) counter++; } if (counter == N - 1) set.Add(i); } Console.WriteLine( (set.Count() == 1 ) ? set.First() + 1 : -1); } } // class Program