n = int(eval(input()))

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



a = arr[0]



for i in range(1, n):

    a ^= arr[i]



ans = []

for i in range(n):

    ans.append(a ^ arr[i])

    

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

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



a = 0



for i in range(n):

    a ^= arr[i]



ans = []

for i in range(n):

    ans.append(a ^ arr[i])



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

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

-a = arr[0] -for i in range(1, n): +a = 0 +for i in range(n):