w,h,c=gets.split h.to_i.times{|x|puts (0...w.to_i).map{|y|(x+y+((c>'B')?1:0))%2!=0?'W':'B'}.join}