import std.stdio, std.conv, std.string, std.range, std.math, std.algorithm; void main() { auto input = readln.split; auto W = input[0].to!int, H = input[1].to!int; auto C = input[2]; auto cur = (C == "B" ? 0 : 1); auto color = ["B", "W"].cycle; iota(H) .tee!(a => writeln) .each!(h => iota(W) .each!(w => color[cur++].write)); }