#include using ll = long long; using ull = unsigned long long; using ld = long double; #define rep(i,a,b) for (int i = a; i < b; i++) #define irep(i,a,b) for (int i = a; i > b; i--) #define print(n) cout << n << endl #define rup(a,b) (a+b-1)/b using namespace std; int main(){ cout << fixed << setprecision(15); int w,h; cin>>w>>h; string s; cin>>s; if (s=="W") s = "WB"; else s = "BW"; int now = 1; rep(i,0,h){ string ns = ""; rep(j,0,w){ if ((i+j)%2 == 0) ns += s[0]; else ns += s[1]; } print(ns); } //system("pause"); return 0; }