import java.util.*; import java.io.*; public class Main{ static final Reader sc = new Reader(); static final PrintWriter out = new PrintWriter(System.out,false); public static void main(String[] args) throws Exception { int w = sc.nextInt(); int h = sc.nextInt(); String c = sc.next(); boolean flag; if(c.equals("B")){ flag = true; } else{ flag = false; } for(int i=0;i