package yukicoder; import java.util.Scanner; public class No351 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int H = sc.nextInt();//受け取り開始 int W = sc.nextInt(); int N = sc.nextInt(); String[] S = new String[N+1]; for(int i = 0; i < S.length; i++){ S[i] = sc.nextLine(); }//受け取り終了 int[][] B = new int[H][W];//ブロック作成開始 for(int i = 0; i < H; i++){ for(int j = 0; j < W; j++){ if(i%2 == 0){ if(j%2 == 0){ B[i][j] = 1; } }else if(i%2 == 1){ if(j%2 == 1){ B[i][j] = 1; } } } }//ブロック作成終了 for(int i = 1; i < S.length; i++){ char c = S[i].charAt(0); String SNum = S[i].substring(2, 3); int num = Integer.parseInt(SNum); switch(c){ case 'R': int tmp = B[num][W-1]; for(int j = W - 1; j >= 1; j--){ B[num][j] = B[num][j - 1]; } B[num][0] = tmp; break; case 'C': int tmp2 = B[H-1][num]; for(int j = H - 1; j >= 1; j--){ B[j][num] = B[j - 1][num]; } B[0][num] = tmp2; } } String Output; if(B[0][0]==1){ Output = "white"; }else{ Output = "black"; } System.out.println(Output); } }