#include using namespace std; int H, W; bool map[10000][10000]; void init(){ for(int i = 0; i < H; i++){ for(int j = 0; j < W; j++){ map[i][j] = (i+j)%2 == 0; } } } void row(int r){ bool tmp = map[r][W-1]; for(int i = W-1; i >= 1; i--) map[r][i] = map[r][i-1]; map[r][0] = tmp; } void column(int c){ bool tmp = map[H-1][c]; for(int i = H-1; i >= 1; i--) map[i][c] = map[i-1][c]; map[0][c] = tmp; } int main(){ cin >> H >> W; init(); int n; cin >> n; char s; int k; while(n-- > 0){ cin >> s >> k; if(s == 'R') row(k); else if(s == 'C') column(k); } if(map[0][0]) cout << "white" << endl; else cout << "black" << endl; return 0; }