N = int(input())

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



xor_left = [0]

for a in A:

    xor_left.append(xor_left[-1] ^ a)

xor_left.append(0)



xor_right = [0]

for a in A[::-1]:

    xor_right.append(xor_right[-1] ^ a)

xor_right.append(0)

xor_right = xor_right[::-1]



ans = []

for i in range(1, N + 1):

    ans.append(xor_left[i - 1] ^ xor_right[i + 1])

print(*ans, sep=' ')

from functools import reduce

N = int(input())

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



ALL_XOR = reduce(lambda x, y: x ^ y, A)

print(*[a ^ ALL_XOR for a in A], sep=' ')

N = int(input())
A = list(map(int, input().split()))
xor_left = [0]
for a in A:
    xor_left.append(xor_left[-1] ^ a)
xor_left.append(0)
xor_right = [0]
for a in A[::-1]:
    xor_right.append(xor_right[-1] ^ a)
xor_right.append(0)
xor_right = xor_right[::-1]
ans = []
for i in range(1, N + 1):
    ans.append(xor_left[i - 1] ^ xor_right[i + 1])
print(*ans, sep=" ")

from functools import reduce

N = int(input())
A = list(map(int, input().split()))
ALL_XOR = reduce(lambda x, y: x ^ y, A)
print(*[a ^ ALL_XOR for a in A], sep=" ")

+from functools import reduce + -xor_left = [0] -for a in A: -    xor_left.append(xor_left[-1] ^ a) -xor_left.append(0) -xor_right = [0] -for a in A[::-1]: -    xor_right.append(xor_right[-1] ^ a) -xor_right.append(0) -xor_right = xor_right[::-1] -ans = [] -for i in range(1, N + 1): -    ans.append(xor_left[i - 1] ^ xor_right[i + 1]) -print(*ans, sep=" ") +ALL_XOR = reduce(lambda x, y: x ^ y, A) +print(*[a ^ ALL_XOR for a in A], sep=" ")