def main(): H, W = map(int, raw_input().split()) N = input() H, W, M = H-1, W-1, N-1 S = ['' for x in range(N)] K = [0 for x in range(N)] for i in range(N): s = raw_input().split() S[i] = s[0] K[i] = int(s[1]) y=x=c=0 for i in range(N): c = M-i if S[c] == 'C': if K[c] == x: y += -1 if y else H else: if K[c] == y: x += -1 if x else W print('black' if (y+x)%2 else 'white') if __name__ == '__main__': main()