w,h,c=gets.split puts (1..h.to_i).map{|i|("BW"*w.to_i)["BW".index(c)+i%2,w.to_i]}