import sys def main(): H, W = map(int, input().split()) if H == W == 1: print('white') return N = int(input()) S = sys.stdin.read().splitlines() col, row = 0, 0 for s in S[::-1]: if s == 'R ' + str(row): col = col - 1 if col > 0 else W - 1 elif s == 'C ' + str(col): row = row - 1 if row > 0 else H - 1 puzzle = '01' * (W // 2 + 1) color = ('white', 'black') i = int(puzzle[col]) if row % 2: i = not i print(color[i]) main()