str = gets.split
w = str[0].to_i
h = str[1].to_i
c = str[2]
b = c == "B" ? 0 : 1
h.times do |y|
    w.times do |x|
        if (x + y + b) % 2 == 0
            print "B"
        else
            print "W"
        end
    end
    puts
end