#include <stdio.h>

int main(){
	int horizontal, vertical;
	scanf("%d%d",&horizontal,&vertical);
	char *str;
	scanf("%s",*str);
	
	for(int i = 0;i < vertical;i++){
		for(int j = 0;j < horizontal;j++){
			printf("%s",str);
			if(str == "W"){
				str = "B";
			}else{
				str = "W";
			}
		}
		printf("\n");
	}
}