#include using namespace std; using ll = long long; using ul = unsigned long; using ull = unsigned long long; const string TARGET_NO = "0351"; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); ll h, w, n; cin >> h >> w >> n; stack > st; for (ll i = 0; i < n; ++i) { string s; ll k; cin >> s >> k; st.push(make_pair(s, k)); } ll c{ 0 }, r{ 0 }; while (!st.empty()) { pair p = st.top(); st.pop(); if (p.first == "R" && p.second == r) c = (c + w - 1) % w; else if (p.first == "C" && p.second == c) r = (r + h - 1) % h; } string res = (r + c) & 1 ? "black" : "white"; cout << res << "\n"; return 0; }