W, H, C = input().split() s = 'BW' W = int(W) H = int(H) x = [0, 1][C == 'W'] for i in range(H): print(((W//2+1+x)*s)[i%2+x:][:W])