import java.util.Scanner; public class Main { 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 = next(next(c)); sc.close(); for(int i = 0; i < h; i++){ for(int j = 0; j < w; j++){ System.out.print(c); c = next(c); } c = tmp = next(tmp); System.out.println(); } } public static String next(String c){ String b = "B"; if(c.equals(b)){ return "W"; }else{ return b; } } }