package main import "fmt" func main() { var N, D int fmt.Scan(&N, &D) // A => 1, B => 2, C => 0 var aCount, bCount int for acnt := 0; acnt <= N; acnt++ { bcnt := (D - acnt) / 2 if bcnt >= 0 && acnt + bcnt * 2 == D && acnt + bcnt <= N { aCount = acnt bCount = bcnt } } for i := 0; i < aCount; i++ { fmt.Print("A") } for i := 0; i < bCount; i++ { fmt.Print("B") } for i := 0; i < N - (aCount + bCount); i++ { fmt.Print("C") } fmt.Println() }