W,H,c=input().split();w=int(W);h=int(H); for i in range(h): if c=='W': a='WB'*w elif c=='B': a='BW'*w if i%2!=0: print(a[1:w+1]) else: print(a[:w])