#include using namespace std; using int64 = int64_t; #define times(n, i) for (int i = 0; i < n; i++) #define range(n, m, i) for (int i = n; i < m; i++) #define upto(n, m, i) for (int i = n; i <= m; i++) #define downto(n, m, i) for (int i = n; i >= m; i--) #define foreach(xs, x) for (auto &x : xs) #define all(xs) (xs).begin(), (xs).end() #define sortall(xs) sort(all(xs)) #define reverseall(xs) reverse(all(xs)) #define uniqueall(xs) erase(unique(all(xs)), (xs).end()) int64 mod10e9_7 = 1000000007; int main() { int h, w, n; cin >> h >> w >> n; vector d(h); times(h, y) { d[y] = 0; for (int i = (y + ((w+1)%2))%2; i < w; i += 2) { d[y] += 1 << i; } } char s; int v; vector> c(n); times(n, i) { cin >> s >> v; c[i].first = s; c[i].second = v; } reverseall(c); int y = 0, x = 0; times(n, i) { if (c[i].first == 'R') { if (c[i].second == y) x = (x-1+w)%w; } else if (c[i].second == x) y = (y-1+h)%h; } cout << ((d[y] & (1 << (w-x-1))) == 0 ? "black" : "white") << endl; return 0; }