#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define sz size() #define pb push_back #define mp make_pair #define fi first #define se second #define all(c) (c).begin(), (c).end() #define rep(i,a,b) for(long long i=(a);i<(b);++i) #define clr(a, b) memset((a), (b) ,sizeof(a)) #define MOD 1000000007 int d[1000000]; int dd[1000000]; int main(){ int h,w; int n; cin>>h>>w; cin>>n; vector > v; rep(i,0,n){ string s; int a; cin>>s>>a; if(s=="R")d[i]=0; else d[i]=1; dd[i] = a; } int x=0, y=0; for(int i = n-1; i >= 0; i--){ if(d[i]==0&&dd[i]==y){ x+=w;x--;x%=w; } else if(d[i]==1&&dd[i]==x){ y+=h;y--;y%=h; } } if((x+y)%2==0)cout << "white" << endl; else cout << "black" << endl; return 0; }