N = int(input()) A = [int(input()) for _ in range(2**N)] D = [[] for _ in range(N)] for i in range(N): idx = (1<>j)&1: D[i].append(j) for i in range(2**N): tmp = 0 for j in range(64): if (i>>j)&1: for k in D[j]: tmp ^= (1<