W, H, C = gets.split W = W.to_i H = H.to_i A = [?W, ?B] H.times{|h| i = (A.index(C)+h)&1 W.times{ putc A[i] i^=1 } puts }