main = do
	[w, h, c] <- getLine >>= return . words
	let sq = cycle (if c == "B" then "BW" else "WB")
	mapM_ putStrLn $ [ take (read w) (drop i sq) | i<-[0..read h - 1] ]