w,h,c=gets.split;h.to_i.times{|i|puts [a=w.to_i.times.map{|i|:BW[1&i+c.ord]}*'',a.tr('BW','WB')][i&1]}