#include #include #include #include #include #include #include using namespace std; char S[1000000]; int K[1000000]; int main() { cin.tie(0); ios::sync_with_stdio(false); int H, W, N; cin >> H >> W >> N; for(int i = 0; i < N; i++) { cin >> S[i] >> K[i]; } reverse(S, S + N); reverse(K, K + N); int x = 0, y = 0; for(int i = 0; i < N; i++) { if(S[i] == 'R') { if(K[i] == y) { x = (x - 1 + W) % W; } } else { if(K[i] == x) { y = (y - 1 + H) % H; } } } if((x + y) % 2 == 0) { cout << "white" << endl; } else { cout << "black" << endl; } }