#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define REP(i,n) for(int i=0;i<(int)(n);i++) #define RREP(i,n) for(int i=n-1;i>=0;i--) #define FOR(i,k,n) for(int i=(k);i<(int)(n);i++) #define all(i,n) (i),(i+n) int dx4[4]={1,0,-1,0}; int dy4[4]={0,-1,0,1}; int dx8[8]={1,0,-1,1,-1,1,0,-1}; int dy8[8]={1,1,1,0,0,-1,-1,-1}; int dx9[9]={0,1,0,-1,1,-1,1,0,-1}; int dy9[9]={0,1,1,1,0,0,-1,-1,-1}; typedef pair P; typedef pair SP; typedef long long ll; typedef pair PLL; const int INF = 1e9; const ll LLINF = 1e18; const int MAX_V = 1e6+1; const ll mod = 1000000007; // << fixed << setprecision // -------------------------------------- int h, w, n; int main() { cin.tie(0); ios::sync_with_stdio(false); cin >> h >> w >> n; vector> vp(n); REP(i, n) { char c; int x; cin >> c >> x; vp[i] = make_pair(c, x); } int y = 0, x = 0; RREP(i, n) { pair p = vp[i]; if(p.first == 'R' && p.second == y) { if(x - 1 < 0) x = w - 1; else x--; } else if(p.first == 'C' && p.second == x) { if(y - 1 < 0) y = h - 1; else y--; } } cout << ((y + x) % 2 == 0 ? "white" : "black") << endl; }