#include<iostream>
#include<cstdio>
#include<array>
using namespace std;

int main() {
	int w, h;
	char c[2];
	scanf("%d %d %c", &w, &h, c);
	
	if (c[0] == 'B') c[1] = 'W';
	else c[1] = 'B';

	for (int i = 0; i < h; i++)
	{
		for (int k = 0; k < w; k++)
		{
			printf("%c", c[(i+k)%2]);
		}
		printf("\n");
	}

	return 0;
}