#include #include #include #include using namespace std; int main() { cin.sync_with_stdio(0); cin.tie(0); int h, w, n; cin>>h>>w>>n; vector> q(n); for(auto& e: q) { string s; int k; cin>>s>>k; e=make_pair(s[0], k); } reverse(begin(q), end(q)); int r=0, c=0; for(auto& e: q) { int k=e.second; if (e.first=='R') { if (r==k) { --c; if (c<0) c+=w; } } else { if (c==k) { --r; if (r<0) r+=h; } } } cout<<((r+c)%2 ? "black" : "white")<