width, height, color = gets.chomp.split(" ") list = Array.new height.to_i.times do width.to_i.times do print color color = color == "B" ? "W" : "B" end color = color == "B" ? "W" : "B" if width.even? puts end