import java.util.Scanner; public class Main{ private static char change(char c){ if(c=='B')return 'W'; else return 'B'; } public static void main(String args[])throws Exception{ Scanner sc=new Scanner(System.in); String s[]=sc.nextLine().split(" "); int w=Integer.parseInt(s[0]); int h=Integer.parseInt(s[1]); char c=s[2].charAt(0); String s1="",s2=""; for(int i=0;i