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; for (int ii = n - 1; ii >= 0; --ii) { if (slist[ii] == "R" && klist[ii] == y) { x = (x - 1 < 0) ? w - 1 : x - 1; } else if (slist[ii] == "C" && klist[ii] == x) { y = (y - 1 < 0) ? h - 1 : y - 1; } } return ((x + y) % 2 == 0) ? "white" : "black"; } static string No_351() { // h w String[] str = Console.ReadLine().Split(' '); int h = Int32.Parse(str[0]); int w = Int32.Parse(str[1]); // n int n = Int32.Parse(Console.ReadLine()); // S K string[] slist = new string[n]; int[] klist = new int[n]; 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()); } }