W, H, C = input().split() W, H = int(W), int(H) if C == "B": D = "W" else: D = "B" for i in range(H): ans = [] for j in range(W): if (i + j) % 2: ans.append(D) else: ans.append(C) print(*ans, sep="")