n=int(eval(input()))



a=list(map(int,input().split()))



tmp=[]



for i in range(n):

    if i%2==1:

        continue

    x=a[i]^a[i+1]

    tmp.append(x)



S=0

for j in range(len(tmp)):

    S = S^tmp[j]



ans=[]



for k in range(n):

    p = a[k]^S

    ans.append(p)



print((*ans))
n=int(eval(input()))

a=list(map(int,input().split()))



s=0

for i in range(n):

    s=s^a[i]



ans=[]

for j in range(n):

    tmp = s^a[j]

    ans.append(tmp)



print((*ans))
n = int(eval(input()))
a = list(map(int, input().split()))
tmp = []
for i in range(n):
    if i % 2 == 1:
        continue
    x = a[i] ^ a[i + 1]
    tmp.append(x)
S = 0
for j in range(len(tmp)):
    S = S ^ tmp[j]
ans = []
for k in range(n):
    p = a[k] ^ S
    ans.append(p)
print((*ans))

n = int(eval(input()))
a = list(map(int, input().split()))
s = 0
for i in range(n):
    s = s ^ a[i]
ans = []
for j in range(n):
    tmp = s ^ a[j]
    ans.append(tmp)
print((*ans))

-tmp = [] +s = 0 -    if i % 2 == 1: -        continue -    x = a[i] ^ a[i + 1] -    tmp.append(x) -S = 0 -for j in range(len(tmp)): -    S = S ^ tmp[j] +    s = s ^ a[i] -for k in range(n): -    p = a[k] ^ S -    ans.append(p) +for j in range(n): +    tmp = s ^ a[j] +    ans.append(tmp)