# -*- coding: utf-8 -*- N = int(input()) A = list(map(int, input().split())) #B = [] #for a in A: # B.append(format(a, '015b')) #X = 0 dp = [False] * (pow(2,15)+1) dp[0] = True def solution(i, m): if dp[m^A[i]]: return dp[m^A[i]] dp[m^A[i]] = True if i