w, h, c = gets.chomp.split d = (c == 'B') ? 'W' : 'B' h.to_i.times{|i| w.to_i.times{|j| print ((i - j) % 2 == 0) ? c : d } puts }