#include <bits/stdc++.h>
using namespace std;

int main(){
	ios::sync_with_stdio(false);
	cin.tie(0);  
	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++) {
		int k = (i % 2 == 0 ? 0 : 1);
		for(int j = 0; j < w; j++) {
			cout << c[k % 2];
			k++;
		}
		cout << '\n';
	}
	return 0;	
}