n = int(eval(input()))

a = [int(i) for i in input().split()]

s = 0

for ai in a:

    s ^= ai

b = [a[i] ^ s for i in range(n)]

print((*b))
n = int(eval(input()))

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

s = 0

for ai in a:

    s ^= ai

print((*[s ^ ai for ai in a]))
n = int(eval(input()))
a = [int(i) for i in input().split()]
s = 0
for ai in a:
    s ^= ai
b = [a[i] ^ s for i in range(n)]
print((*b))

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

-a = [int(i) for i in input().split()] +a = list(map(int, input().split())) -b = [a[i] ^ s for i in range(n)] -print((*b)) +print((*[s ^ ai for ai in a]))