import java.util.Scanner; class N082{ public static void main(String args[]){ Scanner s = new Scanner(System.in); int w = s.nextInt(); int h = s.nextInt(); String a = s.next(); String b; for(int i = 0; i < h; i++){ b = a.equals("B") ? "W" : "B"; for(int j = 0; j < w / 2; j++){ System.out.print(a+b); } if(w % 2 != 0){ System.out.println(a); }else{ System.out.println(); } a = b; } } }