N=int(input())

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

"""

20 10100 11010

11 01011 00101

9  01001 00111

24 11000 10110

"""

for i in range(N):

    if i==0:

        now=A[0]

    else:

        now=now^A[i]

for i in range(N):

    ans=now^A[i]

    print(ans, end=" ")

N=int(input())

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

now=A[0]

for i in range(1,N):

    now=now^A[i]



for i in range(N):

    print(now^A[i], end=" ")

N = int(input())
A = list(map(int, input().split()))
"""
20 10100 11010
11 01011 00101
9  01001 00111
24 11000 10110
"""
for i in range(N):
    if i == 0:
        now = A[0]
    else:
        now = now ^ A[i]
for i in range(N):
    ans = now ^ A[i]
    print(ans, end=" ")

N = int(input())
A = list(map(int, input().split()))
now = A[0]
for i in range(1, N):
    now = now ^ A[i]
for i in range(N):
    print(now ^ A[i], end=" ")

-""" -20 10100 11010 -11 01011 00101 -9  01001 00111 -24 11000 10110 -""" +now = A[0] +for i in range(1, N): +    now = now ^ A[i] -    if i == 0: -        now = A[0] -    else: -        now = now ^ A[i] -for i in range(N): -    ans = now ^ A[i] -    print(ans, end=" ") +    print(now ^ A[i], end=" ")