#include <iostream>
using namespace std;
int main(void) {
	int w, h;
	char c;
	cin >> w >> h >> c;
	for (int i = 0; i < h; ++i) {
		if (i % 2 == 0) {
			for (int j = 0; j < w; ++j) {
				if (j % 2 == 0) {
					if (c == 'B') cout << 'B';
					else cout << 'W';
				}
				else {
					if (c == 'B') cout << 'W';
					else cout << 'B';
				}
			}
		}
		else {
			for (int j = 0; j < w; ++j) {
				if (j % 2 == 0) {
					if (c == 'B') cout << 'W';
					else cout << 'B';
				}
				else {
					if (c == 'B') cout << 'B';
					else cout << 'W';
				}
			}
		}
		cout << endl;
	}
	return 0;
}