w,h,c=input().split() w=int(w) h=int(h) for i in range(h): a=[] for j in range(w): if c=="B" and (i+j)%2==0 or c=="W" and (i+j)%2==1: a.append("B") else: a.append("W") print("".join(a))