# coding=UTF-8: import itertools def moyou(W, H, C): moyouListA = "WB" moyouListB = "BW" moyouLine = "" W, H = int(W), int(H) Wc, Hc = 0, 0 if C == "W": for i in itertools.cycle(moyouListA): moyouLine += i if len(moyouLine) == W * H: break elif C == "B": for i in itertools.cycle(moyouListB): moyouLine += i if len(moyouLine) == W * H: break ansLine = list([moyouLine[i:i+W] for i in range(len(moyouLine)//W)]) for string in ansLine: print(string, sep="\n") return w, h, c = map(str, input().split()) moyou(w, h, c)