package net.ipipip0129.kotlin.yukicoder

fun main(args: Array<String>) {
    val data = readLine()!!.split(" ")
    val width = data[0].toInt()
    val height = data[1].toInt()
    val isODD = width % 2 == 0
    var isBlack = data[2] == "B"

    for (j in 0 until height) {
        for (i in 0 until width) {
            print(if (isBlack) "B" else "W")
            isBlack = !isBlack
        }
        if (isODD) isBlack = !isBlack
        println()
    }
}