whc = gets.chomp.split
w,h = whc.values_at(0,1).map(&:to_i)
c = whc[2]

ROW = ("BW" * (w / 2 + 1))
h.times.inject( c == 'B') {|b,i|
    puts ROW[b ? 0 : 1, w]
    !b
}