import java.util.*;
public class kadomatsu2{
	public static void main(String... args){
		Scanner scan = new Scanner(System.in);
		int w = scan.nextInt();
		int h = scan.nextInt();
		String start = scan.next();
		make(w,h,start);
	}
	public static void make(int w,int h,String start){
		String next = whatNext(start),first=start;
		for(int i = 1; i <= h; i++){
			for(int j = 1; j <= w; j++){
				System.out.print((j%2!=0)?first:next);
			}
			System.out.print("\n");
			next = first;
			first = whatNext(next);
		}
	}
	public static String whatNext(String start){
		return (start.equals("B"))?"W":"B";
	}
}