w, h, c = gets.strip.split(' ') w = w.to_i h = h.to_i result = '' w.times {|i| h.times {|j| result += if i % 2 == 0 then if j % 2 == 0 then '0' else '1' end else if j % 2 == 1 then '0' else '1' end end } result += "\n" } if c === 'W' then result.gsub!('0', 'W').gsub!('1', 'B') else result.gsub!('0', 'B').gsub!('1', 'W') end puts result