w, h, c = gets.split(' ') w, h = [w.to_i, h.to_i] count = 0 while count < h if (c == 'B' && count.even?) || (c == 'W' && count.odd?) puts ('BW' * w).slice(0, w) else puts ('WB' * w).slice(0, w) end count += 1 end