import sys from operator import itemgetter from collections import defaultdict, deque import heapq import bisect stdin=sys.stdin sys.setrecursionlimit(10 ** 8) ip=lambda: int(sp()) fp=lambda: float(sp()) lp=lambda:list(map(int,stdin.readline().split())) sp=lambda:stdin.readline().rstrip() Yp=lambda:print('Yes') Np=lambda:print('No') inf = 1 << 60 eps = 1e-9 sortkey = itemgetter(0) Max = 10 ** 6 + 10 N = ip() A = lp() spf = [0 for _ in range(Max)] for i in range(2, Max): if spf[i] != 0: continue for j in range(i, Max, i): spf[j] = i Xor = 0 for get in A: res = 0 while get != 1: now = spf[get] res += 1 get //= now Xor ^= res if Xor: print("white") else: print("black")