n = int(eval(input()))

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



b = a[0]

for v in a[1:]:

    b ^= v

print((*[x ^ b for x in a]))

from functools import reduce



n = int(eval(input()))

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



b = reduce(lambda acc, x: acc ^ x, a[1:], a[0])

print((*[x ^ b for x in a]))

n = int(eval(input()))
a = list(map(int, input().split()))
b = a[0]
for v in a[1:]:
    b ^= v
print((*[x ^ b for x in a]))

from functools import reduce

n = int(eval(input()))
a = list(map(int, input().split()))
b = reduce(lambda acc, x: acc ^ x, a[1:], a[0])
print((*[x ^ b for x in a]))

+from functools import reduce + -b = a[0] -for v in a[1:]: -    b ^= v +b = reduce(lambda acc, x: acc ^ x, a[1:], a[0])