N = int(input()) A = list(map(int,input().split())) C = 10 ** 6 + 1 dat = [0] * C for i in range(2,C): if dat[i] == 0: for j in range(i,C,i): dat[j] += 1 now = i * i while now < C: for j in range(now,C,now): dat[j] += 1 now *= i grundy = 0 for a in A: grundy ^= dat[a] if grundy: print("white") else: print("black")