w, h, c = gets.split w = w.to_i h = h.to_i foo = c == "B" ? 0 : 1 h.times do |i| str = "" w.times do |j| str += (i+j+foo)%2==0 ? "B" : "W" end puts str end