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