import java.util.Scanner; public class Main { static String W = "W"; static String B = "B"; 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 = new String(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){ if(c.equals(B)){ return W; }else{ return B; } } }