import java.util.Scanner; public class Main { public static void main(String[] a) { Scanner s=new Scanner(System.in); int W=s.nextInt(),H=s.nextInt(),C=s.next().charAt(0); String P=String.format("%50s", " ").replaceAll(" ", "WB").substring(C>66?1:0,C>66?1+W:W); while(H-->0)System.out.println(P=P.replace('B','X').replace('W','B').replace('X','W')); } }