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; repeat(0, H) .tee!(_ => writeln) .tee!(_ => cur += W + 1) .each!(h => repeat(0, W) .tee!(_ => cur++) .each!(w => color[cur].write)); }