W, H, C1 = gets.chomp.split intw = W.to_i inth = H.to_i C2 = C1 == "B" ? "W" : "B" (1..inth).each do |n| output = [] (1..intw).each do |i| if (n.odd? && i.odd?) || (n.even? && i.even?) output.push(C1) else output.push(C2) end end puts output.join end