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"]; foreach (h; 0 .. H) { foreach (w; 0 .. W) { color[cur].write; cur = (cur + 1) % 2; } writeln; cur = (cur + W + 1) % 2; } }