#! ruby # yukicoder My Practice # author: Leonardone @ NEETSDKASU W, H, C = gets.chomp.split m = 'WBW'[/#{C}./] H.to_i.times do puts (m*(W.to_i*2))[0...W.to_i] m.reverse! end