inputs = gets.split.map(&:to_s) k = 0 if inputs[2] == "B" color1 = "B" color2 = "W" else color1 = "W" color2 = "B" end for i in 1..inputs[1].to_i for j in 1..inputs[0].to_i k += 1 if k.odd? == true print color1 else print color2 end end puts "" if inputs[0].to_i % 2 == 0 k += 1 end end