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