enum Color{ BLACK,WHITE; } class Paper{ final int width; final int height; final Color color; String line1 = ""; String line2 = ""; public Paper(int i,int j,String s){ this.width = i; this.height = j; if(s.equals("B")){ this.color = Color.BLACK; } else{ this.color = Color.WHITE; } } public void show(){ makeLine(); reverse(); for(int i = 0;i < height;i++){ if(i%2 == 0){ System.out.println(line1); } else{ System.out.println(line2); } } } public void makeLine(){ String s1,s2; if(this.color.equals(Color.BLACK)){ s1 = "B"; s2 = "W"; } else{ s1 = "W"; s2 = "B"; } for(int i = 0;i < this.width;i++){ if(i%2 == 0){ line1 += s1; } else{ line1 += s2; } } } public void reverse(){ String tmp = line1; tmp = tmp.replaceAll("B","t"); tmp = tmp.replaceAll("W","B"); tmp = tmp.replaceAll("t","W"); line2 += tmp; } } public class No_82{ public static void main(String[] args){ java.util.Scanner sc = new java.util.Scanner(System.in); Paper paper = new Paper(sc.nextInt(),sc.nextInt(),sc.next()); paper.show(); } }