#include #include #include using namespace std; int main() { 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=(c-1+w)%w; } else { if (c==k) r=(r-1+h)%h; } } cout<<((r+c)%2 ? "black" : "white")<