import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int W = scan.nextInt(); int H = scan.nextInt(); String C = scan.next(); scan.close(); String temp = C; if(W % 2 == 0) { for(int i = 0; i < H; i++) { for(int j = 0; j < W; j++) { if(temp.equals("W")) { System.out.print(temp); temp = "B"; }else { System.out.print(temp); temp = "W"; } } System.out.println(); if(temp.equals("W")) { temp = "B"; }else { temp = "W"; } } }else { for(int i = 0; i < H; i++) { for(int j = 0; j < W; j++) { if(temp.equals("W")) { System.out.print(temp); temp = "B"; }else { System.out.print(temp); temp = "W"; } } System.out.println(); } } } }