#include using namespace std; #define rep(i,a,b) for(int i=a;i psi; int main() { int H, W, N; cin >> H >> W >> N; vector SK(N); rep(i, 0, N) { string s; int k; cin >> s >> k; SK[i] = MP(s, k); } int x, y; x = y = 0; rep(i, 0, N) { int j = N - 1 - i; string s = SK[j].first; int k = SK[j].second; if (s == "R") { if (y == k) { x--; if (x < 0) x = W - 1; } } else { if (x == k) { y--; if (y < 0) y = H - 1; } } } if ((x + y) % 2 == 0) cout << "white" << endl; else cout << "black" << endl; }