#include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; int main() { int h, w, n, x = 0, y = 0; cin >> h >> w >> n; vector> v(n); for (int i = 0; i < n; i++) cin >> v[i].first >> v[i].second; for (int i = n-1; i >= 0; i--){ if (v[i].first == 'R' && y == v[i].second) x = (x+w-1)%w; else if (v[i].first == 'C' && x == v[i].second) y = (y+h-1)%h; } cout << (((x+y)%2) ? "black" : "white") << endl; }