import java.util.*;

class No0082{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int w = sc.nextInt();
		int h = sc.nextInt();
		String c = sc.next();
		String tmp = "";
		String[][] str = new String[h][w];

		for(int i = 0; i < h; i++){
			if(i == 0){
				str[0][0] = c;
				tmp = c;
			}else if(str[i - 1][0].equals("B")){
				str[i][0] = "W";
				tmp = "W";
			}else if(str[i - 1][0].equals("W")){
				str[i][0] = "B";
				tmp = "B";
			}
			for(int j = 1; j < w; j++){
				if(tmp.equals("B")){
					str[i][j] = "W";
					tmp = "W";
				}else{
					str[i][j] = "B";
					tmp = "B";
				}
			}
		}

		for(int i = 0; i < h; i++){
			for(int j = 0; j < w; j++){
				System.out.print(str[i][j]);
			}
			System.out.println();
		}
	}
}