package yukicoder; import java.util.Scanner; public class Yuki82 { 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(); for (int j = 1; j <= h; j++) { for (int i = 1; i <= w; i++) { test(c,j,i); } System.out.print("\n"); } } private static void test(String str,int j,int i) { if("B".equals(str)){ if(j%2 == 0) { if (i%2 == 0){ System.out.print("B"); } else { System.out.print("W"); } }else { if (i%2 != 0){ System.out.print("B"); } else { System.out.print("W"); } } } else { if(j%2 == 0) { if (i%2 == 0){ System.out.print("W"); } else { System.out.print("B"); } }else { if (i%2 != 0){ System.out.print("W"); } else { System.out.print("B"); } } } } }