using System; namespace y { class Program { static void Main(string[] args) { string[] ss = Console.ReadLine().Split(); int h = int.Parse(ss[0]); int w = int.Parse(ss[1]); int n = int.Parse(Console.ReadLine()); string[] a = new string[n]; for (int i = 0; i < n; i++) { a[i] = Console.ReadLine(); } int x = 0, y = h - 1; for (int i = n - 1; i >= 0; i--) { ss = a[i].Split(); if (ss[0] == "R" && (h - 1) - int.Parse(ss[1]) == y) { x = x - 1; if (x < 0) x = w - 1; } if (ss[0] == "C" && int.Parse(ss[1]) == x) { y = y + 1; if (y > h - 1) y = 0; } } string ans = ""; if (x % 2 == 1) { ans = y % 2 == 0 ? "white" : "black"; } else { ans = y % 2 == 1 ? "white" : "black"; } if (h % 2 == 1) { if (ans == "black") ans = "white"; else ans = "black"; } Console.WriteLine(ans); } } }