#include <iostream>
#include <cmath>
using namespace std;
 
int main(){
	int W, H;
	string C;
	cin >> W >> H >> C;
	int LeftUp;
	if(C == "B"){
		LeftUp = 0;
	}else{
		LeftUp = 1;
	}
	for(int i = 0; i < H; i++){
		for(int j = 0; j < W; j++){
			if((i + j + LeftUp) % 2 == 0){
				cout << "B";
			}else{
				cout << "W";
			}
		}
		cout << endl;
	}
}