# -*- coding:utf-8 -*- if __name__ == "__main__": w,h,c = raw_input().split() w = int(w) h = int(h) c = list(c) if c[0] == "B": c.append("W") else: c.append("B") for i in range(h): if w % 2 == 1: print ''.join(c) * (w/2) + c[0] else: print ''.join(c) * (w/2) c = c[::-1]