#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
#define pb push_back
#define mp make_pair
#define rep(i,n) for(int i=0;i<(n);++i)
const int mod=1000000007;

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	int w,h;cin >> w >> h;
	char c,d;cin >> c;
	if(c=='B') d='W';
	else d='B';
	vector<string> ans(h);
	rep(i,h){
		rep(j,w){
			if(i%2==0){
				if(j%2==0) ans.at(i)+=c;
				else ans.at(i)+=d;
			}
			else{
				if(j%2==0) ans.at(i)+=d;
				else ans.at(i)+=c;
			}
		}
	}
	rep(i,h) cout << ans.at(i) << endl;
}