#include <bits/stdc++.h> using namespace std; typedef unsigned long long ull; typedef long long ll; int main(){ int w, h; char c[2]; cin >> w >> h >> c[0]; if(c[0]=='B') c[1]='W'; else c[1]='B'; for(int i=0; i<h; i++){ for(int j=0; j<w; j++){ cout << c[(i+j)%2]; } cout << endl; } return 0; }