w,h,c=input().split()
w,h=int(w),int(h)
while len(c)<w+1:
  c+="BW"[c[-1]<"W"]
d=c[1:]
c=c[:-1]
for i in '.'*h:
  print(c)
  c,d=d,c