import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class No82 { public static void main(String[] args) throws IOException{ String[] str = new BufferedReader(new InputStreamReader(System.in)).readLine().split(" "); int w = Integer.parseInt(str[0]); int h = Integer.parseInt(str[1]); String[][] ichimatsu = new String[h][w]; ichimatsu[0][0] = str[2]; if(ichimatsu[0][0].equals("B")){ for(int i=1; i < h; i+=2) ichimatsu[i][0] = "W"; for(int i=2; i < h; i+=2) ichimatsu[i][0] = "B"; } else{ for(int i=1; i < h; i+=2) ichimatsu[i][0] = "B"; for(int i=2; i < h; i+=2) ichimatsu[i][0] = "W"; } makeIchimatsu(h,w,ichimatsu); for(int i=0; i < h; i++){ for(int j=0; j < w; j++) System.out.print(ichimatsu[i][j]); System.out.println(""); } } public static void makeIchimatsu(int h, int w, String[][] s){ for(int i=0; i < h; i++){ if(s[i][0].equals("B")){ for(int j=1; j < w; j+=2) s[i][j] = "W"; for(int j=2; j < w; j+=2) s[i][j] = "B"; } else{ for(int j=1; j < w; j+=2) s[i][j] = "B"; for(int j=2; j < w; j+=2) s[i][j] = "W"; } } } }