w, h, c = gets.chomp.split w = w.to_i h = h.to_i bw = 'BW' h.times do |y| w.times do |x| j = 0 if c == 'B' j = (x + y) % 2 else j = (x + y + 1) % 2 end print bw[j] end puts end