N = int(input()) A = list(map(int,input().split())) T = [0]*(10**6+1) for i in range(2,10**3+1): if T[i]==0: for j in range(i,10**6+1,i): T[j]=i XOR = [] for a in A: c = 0 while T[a]>0: c+=1 a = a//T[a] XOR.append(c) nim = 0 for xor in XOR: nim^=xor if nim==0: print('black') else: print('white')