W, H, C1 = gets.chomp.split intw = W.to_i inth = H.to_i C2 = C1 == "B" ? "W" : "B" str1 = "" (1..intw).each do |i| str1 = if i.odd? str1 + C1 else str1 + C2 end end str2 = "" if inth != 1 (1..intw).each do |i| str2 = if i.odd? str2 + C2 else str2 + C1 end end (1..inth).each do |i| if i.odd? puts str1 else puts str2 end end else puts str1 end