#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define ll long long #define INF (1 << 30) #define INFLL (1LL << 60) int main() { int h,w,n; vector > move; cin >> h >> w >> n; char a; int b; for(int i = 0;i < n;i++){ cin >> a >> b; move.push_back(make_pair(a,b)); } pair now; now = make_pair(0,0); for(int i = move.size()-1;i >= 0;i--){ char muki = move[i].first; int zahyo = move[i].second; int nx = now.first,ny = now.second; if(muki == 'R'){ if(ny == zahyo) nx--; if(nx < 0) nx = w-1; }else{ if(nx == zahyo) ny--; if(ny < 0) ny = h-1; } now = make_pair(nx,ny); } if((now.first + now.second) % 2 == 0) cout << "white" << endl; else cout << "black" << endl; return 0; }