N = 10 ** 6 prime_list = [] # 素数リスト lpf = [0] * (N + 1) # 最小素因数 for i in range(2, N + 1): if not lpf[i]: lpf[i] = i prime_list.append(i) a = lpf[i] for p in prime_list: if p > a or p * i > N: break lpf[p*i] = p # print("lpf =", lpf) L = [0] * (N + 1) for i in range(2, N + 1): p = lpf[i] L[i] = L[i//p] + 1 n = int(input()) A = [int(a) for a in input().split()] s = 0 for a in A: s ^= L[a] print("white" if s else "black")