w,h,c = gets.split(" ") w = w.to_i case c when "B" c_rev = "W" when "W" c_rev = "B" end pattern = [(c + c_rev) * (w / 2) + c * (w % 2) , (c_rev + c) * (w / 2) + c_rev * (w % 2)] h.to_i.times{|i| puts pattern[i % 2] }