n = int(input())

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

s = 0

for i in a:

    s = s ^ i

ans = []

for i in a:

    ans.append(s ^ i)

print(*ans, sep=' ')

n = int(input())

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

s = 0

for i in a:

    s = s ^ i

ans = [s ^ i for i in a]

print(*ans, sep=' ')

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

n = int(input())
a = list(map(int, input().split()))
s = 0
for i in a:
    s = s ^ i
ans = [s ^ i for i in a]
print(*ans, sep=" ")

-ans = [] -for i in a: -    ans.append(s ^ i) +ans = [s ^ i for i in a]