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