#!/usr/bin/env python3 h, w = map(int,input().split()) n = int(input()) ops = [(lambda s, k: (s, int(k)))(*input().split()) for i in range(n)] y, x = 0, 0 for s, k in reversed(ops): if s == 'R': if y == k: x = (x - 1) % w elif s == 'C': if x == k: y = (y - 1) % h print(y % 2 == x % 2 and 'white' or 'black')