package main

import (
	"fmt"
)

var (
	ichimatsu = map[string]string{
		"B": "W",
		"W": "B",
	}
)

func resolve(W, H int, C string) {
	c := C
	for i := 0; i < H; i++ {
		d := c
		for j := 0; j < W; j++ {
			fmt.Printf("%s", d)
			d = ichimatsu[d]
		}
		fmt.Println("")
		c = ichimatsu[c]
	}
}

func main() {
	var W, H int
	var C string
	fmt.Scanf("%d %d %s", &W, &H, &C)
	resolve(W, H, C)
}