n = int(input())

A = [*map(int, input().split())]

# print(n)

# print(A)

all_xor = 0

for a in A: all_xor ^= a

# print(all_xor)

ans = []

for a in A: ans.append(all_xor ^ a)

print(*ans,sep=' ')

n = int(eval(input()))

A = [*list(map(int, input().split()))]

all_xor = 0

for a in A: all_xor ^= a

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

n = int(input())
A = [*map(int, input().split())]
# print(n)
# print(A)
all_xor = 0
for a in A:
    all_xor ^= a
# print(all_xor)
ans = []
for a in A:
    ans.append(all_xor ^ a)
print(*ans, sep=" ")

n = int(eval(input()))
A = [*list(map(int, input().split()))]
all_xor = 0
for a in A:
    all_xor ^= a
print((*[all_xor ^ a for a in A]))

-n = int(input()) -A = [*map(int, input().split())] -# print(n) -# print(A) +n = int(eval(input())) +A = [*list(map(int, input().split()))] -# print(all_xor) -ans = [] -for a in A: -    ans.append(all_xor ^ a) -print(*ans, sep=" ") +print((*[all_xor ^ a for a in A]))