package main import . "fmt" import . "strings" func main() { var s string Scan(&s) e:=Index(s,"OOO") w:=Index(s,"XXX") if e==w { Println("NA") } else if e<0||(w>=0&&w