using System; public class Program { public static void Main() { int n = int.Parse(Console.ReadLine()); bool[] renchon = new bool[n]; for (int i = 0; i < n; i++) renchon[i] = true; for (int i = 0; i < n; i++) { string[] greeting = Console.ReadLine().Split(); for (int j = 0; j < n; j++) { if (greeting[j] != "nyanpass") { renchon[j] = false; } } } int index = -1; for (int i = 0; i < n; i++) { if (renchon[i]) { if (index == -1) { index = i; } else { Console.WriteLine(-1); return; } } } if (index == -1) Console.WriteLine(-1); else Console.WriteLine(index+1); } }