from functools import reduce

from operator import xor

n = int(eval(input()))

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





total = []

it = iter(A)

for x, y in zip(it, it):

    total.append(x ^ y)



total = reduce(xor, total)



ans = []

for a in A:

    ans.append(total ^ a)

print((*ans))

from operator import xor

from functools import reduce

n = int(eval(input()))

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

total = reduce(xor, A)

print((*[total ^ a for a in A]))

from functools import reduce
from operator import xor

n = int(eval(input()))
A = list(map(int, input().split()))
total = []
it = iter(A)
for x, y in zip(it, it):
    total.append(x ^ y)
total = reduce(xor, total)
ans = []
for a in A:
    ans.append(total ^ a)
print((*ans))

from operator import xor
from functools import reduce

n = int(eval(input()))
A = list(map(int, input().split()))
total = reduce(xor, A)
print((*[total ^ a for a in A]))

+from operator import xor -from operator import xor -total = [] -it = iter(A) -for x, y in zip(it, it): -    total.append(x ^ y) -total = reduce(xor, total) -ans = [] -for a in A: -    ans.append(total ^ a) -print((*ans)) +total = reduce(xor, A) +print((*[total ^ a for a in A]))