N=int(input()) A=list(map(int,input().split())) # xorの掃き出し法・基底 BASE=[] def sweep(x): for b in BASE: if b^x