#include #include #include void solve() { int h, w; std::cin >> h >> w; int n; std::cin >> n; std::vector> ps(n); for (auto& p : ps) std::cin >> p.first >> p.second; std::reverse(ps.begin(), ps.end()); int x = 0, y = 0; for (auto p : ps) { if (p.first == 'R') { if (p.second != x) continue; if (--y < 0) y += w; } else { if (p.second != y) continue; if (--x < 0) x += h; } } std::cout << ((x + y) % 2 == 0 ? "white" : "black") << std::endl; } int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); solve(); return 0; }