# 愚直シミュレーションは間に合わない # 公式解説より # 全盤面をシミュレートするのは間に合わない # (0, 0)を戻していってどこにあったのかを調べる H, W = map(int, input().split()) query = [] N = int(input()) for i in range(N): s, k = map(str, input().split()) query.append((s, int(k))) #print(query) current = (0, 0) for i in range(N): h, w = current s, k = query[-1-i] if s == 'R': if k == h: current = (h, (w-1)%W) elif s == 'C': if k == w: current = ((h-1)%H, w) #print(s, k, current) h, w = current if (h+w)%2 == 0: print('white') else: print('black')