w,h,c=gets.split pattern=c==?W ? [?W,?B] : [?B,?W] i=1 h=h.to_i w=w.to_i h.times{ w.times{ print pattern[i=1-i] } puts i=1-i if w.even? }