using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; class Program { static string Solve(int w, int h, int n, string[] slist, int[] klist) { int x = 0, y = 0; // 初期位置 : R のとき x を、C のとき y を更新 for (int ii = n - 1; ii >= 0; --ii) { // 行の押し出し if (slist[ii] == "R") { if (klist[ii] == y) { x = (x - 1 + w) % w; } } // 列の押し出し else if (slist[ii] == "C") { if (klist[ii] == x) { y = (y - 1 + h) % h; } } } string result = ((x + y) % 2 == 0) ? "white" : "black"; return result; } static string No_351() { // w h String[] str = Console.ReadLine().Split(' '); int w = Int32.Parse(str[0]); int h = Int32.Parse(str[1]); // n int n = Int32.Parse(Console.ReadLine()); // S K string[] slist = new string[1000000]; int[] klist = new int[1000000]; for (int ii = 0; ii < n; ++ii) { str = Console.ReadLine().Split(' '); slist[ii] = str[0]; klist[ii] = Int32.Parse(str[1]); } return Solve(w, h, n, slist, klist); } static void Main(string[] args) { Console.WriteLine(No_351()); } }