package main import ( "fmt" "bufio" "os" "io" "strings" ) func main () { fp := os.Stdin reader := bufio.NewReaderSize(fp, 4096) for { line, _, err := reader.ReadLine() str := string(line) if err == io.EOF { break } else if err != nil { panic(err) } if strings.HasSuffix(str, "ai") { fmt.Println(str[:len(str)-2] + "AI") } else { fmt.Println(str + "-AI") } } }