import java.util.*; public class Yukicoder_82{ public static void main(String[] args){ Scanner stdIn = new Scanner(System.in); int W = stdIn.nextInt(); int H = stdIn.nextInt(); String str = stdIn.next(); boolean flag; if(str.equals("B")){ flag = true; } else{ flag = false; } for(int i=0;i