N = int(eval(input()))

A = [int(n) for n in input().split()]

X = 0

ans = []

for i in range(N):

  X = X^A[i]

for i in range(N):

  ans.append(X^A[i])

print((*ans))
from functools import reduce

N = int(eval(input()))

A = [int(n) for n in input().split()]

X = reduce(int.__xor__, A)

ans = [X^a for a in A]

print((*ans))
N = int(eval(input()))
A = [int(n) for n in input().split()]
X = 0
ans = []
for i in range(N):
    X = X ^ A[i]
for i in range(N):
    ans.append(X ^ A[i])
print((*ans))

from functools import reduce

N = int(eval(input()))
A = [int(n) for n in input().split()]
X = reduce(int.__xor__, A)
ans = [X ^ a for a in A]
print((*ans))

+from functools import reduce + -X = 0 -ans = [] -for i in range(N): -    X = X ^ A[i] -for i in range(N): -    ans.append(X ^ A[i]) +X = reduce(int.__xor__, A) +ans = [X ^ a for a in A]