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"]; iota(H) .tee!(_ => cur++) .tee!(_ => writeln) .each!(_ => iota(W) .each!(_ => color[cur++ % 2].write)); }