package main import ( "fmt" ) const nyanpass = "nyanpass" func main() { var N int fmt.Scanln(&N) ns := make([]bool, N) var say string for i := 0; i < N; i++ { for j := 0; j < N; j++ { fmt.Scan(&say) if i == j { continue } if say != nyanpass { ns[j] = true } } } s := make([]int, 0, N) for i := range ns { if !ns[i] { s = append(s, i) } } if len(s) != 1 { fmt.Println(-1) return } fmt.Println(s[0] + 1) }