#include using namespace std; const string msg[] = { "white", "black" }; signed main(){ int H, W; cin >> H >> W; int N; cin >> N; vector< pair< string, int > > opx( N ); for( int i = 0; i < N; ++i ) cin >> opx[ i ].first >> opx[ i ].second; int x = 0, y = 0; for( int i = N - 1; i >= 0; --i ){ string op = opx[ i ].first; int v = opx[ i ].second; if( op[ 0 ] == 'R' ){ if( x != v ) continue; y = ( y - 1 + W ) % W; } else{ if( y != v ) continue; x = ( x - 1 + H ) % H; } } cout << msg[ ( ( x & 1 ) + ( y & 1 ) ) & 1 ] << endl; return 0; }