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 = [] if n.odd? (1..intw).each do |i| if i.odd? output.push(C1) else output.push(C2) end end else (1..intw).each do |i| if i.odd? output.push(C2) else output.push(C1) end end end puts output.join end