w, h, c1 = gets.split
w = w.to_i
h = h.to_i
c2 = c1 == "B" ? "W" : "B"

for y in 0...h do
  for x in 0...w do
    print (x + y) % 2 == 0 ? c1 : c2
  end
  puts
end