n = int(input())

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

S=0

for x in a:

    S = S^x

for x in a:

    print(S^x, "", end="")

n = int(eval(input()))

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

S=0

for x in a:

    S = S^x

for x in a:

    print((S^x))
n = int(input())
a = list(map(int, input().split()))
S = 0
for x in a:
    S = S ^ x
for x in a:
    print(S ^ x, "", end="")

n = int(eval(input()))
a = list(map(int, input().split()))
S = 0
for x in a:
    S = S ^ x
for x in a:
    print((S ^ x))

-n = int(input()) +n = int(eval(input())) -    print(S ^ x, "", end="") +    print((S ^ x))