#include <bits/stdc++.h> using namespace std; int main(){ int w,h;cin>>w>>h; string c;cin>>c; int q = c =="B" ? 1 : 0; for(int i=0;i<h;i++){ for(int j=0;j<w;j++){ cout<<((q + j + i) % 2 ? 'B' : 'W'); } cout<<endl; }}