fun main(args:Array<String>) {
    val initData = readLine()!!.split(" ")
    val (w, h) = initData.take(2).map { it.toInt() }
    val c1 = initData[2]
    val c2 = if(c1 == "B") "W" else "B"
    val map = (1..h).map { a -> (1..w).map { b-> if((a+b)%2 == 0) c1 else c2  }.joinToString("") }.forEach{ println(it)}
}