package main import "fmt" func toggle(c string) string { if c == "B" { return "W" } return "B" } func main() { var W, H int var C string fmt.Scan(&W, &H, &C) for i := 0; i < H; i++ { for j := 0; j < W; j++ { fmt.Print(C) C = toggle(C) if j == W-1 && j%2 == 1 { C = toggle(C) } } fmt.Println() } }