n = int(input()) m = 10**6+5 l = [set([0]) for i in range(m)] grundy = [-1]*m grundy[1] = 0 for i in range(2,m): for j in range(m): if j in l[i]: continue grundy[i] = j break for j in range(i*2,m,i): l[j].add(grundy[i]) ans = 0 A = list(map(int,input().split())) for a in A: ans ^= grundy[a] if ans: print("white") else: print("black")