#include <cstdlib>
#include <ios>
#include <iostream>
#include <vector>


int main() {
	std::cout.tie(nullptr);
	std::ios::sync_with_stdio(false);
	int h, w, n;
	std::cin >> h >> w >> n;
	std::vector<char> s(n);
	std::vector<int> k(n);
	for (auto i = 0; i < n; i++)
	{
		std::cin >> s[i] >> k[i];
	}
	int r = 0, c = 0;
	for (auto i = n - 1; i >= 0; i--) {
		if (s[i] == 'R' && k[i] == r)
		{
			c = (c + w - 1) % w;
		}
		else if (s[i] == 'C' && k[i] == c)
		{
			r = (r + h - 1) % h;
		}
	}
	std::cout << ((r + c) % 2 == 0 ? "white" : "black") << std::endl;

	return EXIT_SUCCESS;
}