W, H, C = input().split() W = int(W) H = int(H) if C == "B": other = "W" else: other = "B" for i in range(H): line = "" for j in range(W): if (i + j) % 2 == 0: line += C else: line += other print(line)