#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; const int WHITE = 0; const int BLACK = 1; int main(){ int h, w; cin >> h >> w; int n; cin >> n; int field[h][w]; int val = WHITE; for(int y = 0; y < h; y++){ for(int x = 0; x < w; x++){ field[y][x] = val; val ^= 1; } } char s; int k; for(int i = 0; i < n; i++){ cin >> s >> k; if(s == 'R'){ int num[w]; for(int x = 0; x < w; x++){ num[x] = field[k][(x+w-1)%w]; } for(int x = 0; x < w; x++){ field[k][x] = num[x]; } }else{ int num[h]; for(int y = 0; y < h; y++){ num[y] = field[(y+h-1)%h][k]; } for(int y = 0; y < h; y++){ field[y][k] = num[y]; } } } if(field[0][0] == WHITE){ cout << "white" << endl; }else{ cout << "black" << endl; } return 0; }