n=int(eval(input()))

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

s=0

for aa in a:

  s^=aa

b=[]

for i in range(n):

  b.append(s^a[i])

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

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

b=[]

s=0

for aa in a:

  s^=aa

for aa in a:

  b.append(s^aa)

print((*b))
n = int(eval(input()))
a = list(map(int, input().split()))
s = 0
for aa in a:
    s ^= aa
b = []
for i in range(n):
    b.append(s ^ a[i])
print((*b))

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

+b = [] -b = [] -for i in range(n): -    b.append(s ^ a[i]) +for aa in a: +    b.append(s ^ aa)