H, W = map(int, raw_input().split()) N = input() S = [0]*N K = [0]*N for i in range(N): s = raw_input() S[i] = ord(s[0])-67 K[i] = int(s[2:]) _H, _W = H-1, W-1 y = x = 0 for i in range(N-1, -1, -1): if S[i]: if K[i] == y: x = (x+_W)%W else: if K[i] == x: y = (y+_H)%H print('black' if (y+x)%2 else 'white')