def seachPrimeNum(N): max = int(N**0.5) seachList = [i for i in range(2,N+1)] primeNum = [] while seachList[0] <= max: primeNum.append(seachList[0]) tmp = seachList[0] seachList = [i for i in seachList if i % tmp != 0] primeNum.extend(seachList) return primeNum def adic(dic,x): if x in dic: dic[x] += 1 else: dic[x] = 1 return def factorization(x): dic = {} for p in PL: if x in PL: adic(dic,x) return dic while x % p == 0: adic(dic,p) x //= p if x == 1: return dic # ここには来ないはず print("factorization error") return "error" # 約数の数 def N_divisors(x): dic = factorization(x) ret = 1 for v in dic.values(): ret *= (v+1) return ret N = int(input()) A = list(map(int,input().split())) PL = set(seachPrimeNum(max(max(A),2))) G = 0 for i in range(N): if A[i] != 1: G ^= (N_divisors(A[i]) - 1) if G == 0: print("black") else: print("white")