import java.util.*;

public class Yukicoder_82{
	public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);
		int W = stdIn.nextInt();
		int H = stdIn.nextInt();
		String str = stdIn.next();
		boolean flag;
		if(str.equals("B")){
			flag = true;
		}
		else{
			flag = false;
		}

		for(int i=0;i<H;i++){
			for(int j=0;j<W;j++){
				if(flag){
					System.out.print("B");
					flag = false;
				}
				else{
					System.out.print("W");
					flag = true;
				}
			}
			if(W%2==0){
				if(flag){
					flag = false;
				}
				else{
					flag = true;
				}
			}
			System.out.println();
		}

	}
}