import numpy as np



n = int(eval(input()))

a = np.array(input().split(), np.int64)



S = a[0]



for i in range(1, n):

    S = np.bitwise_xor(S, a[i]) #xor logic

    #print(format(S, 'b')) decimal number→binary number



for i in range(n):

    print((np.bitwise_xor(S, a[i])))
n = int(eval(input()))

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



S = 0



for i in range(n):

    S ^= a[i]



for i in range(n):

    ans = S^a[i]

    print(ans)
import numpy as np

n = int(eval(input()))
a = np.array(input().split(), np.int64)
S = a[0]
for i in range(1, n):
    S = np.bitwise_xor(S, a[i])  # xor logic
    # print(format(S, 'b')) decimal number→binary number
for i in range(n):
    print((np.bitwise_xor(S, a[i])))

n = int(eval(input()))
a = list(map(int, input().split()))
S = 0
for i in range(n):
    S ^= a[i]
for i in range(n):
    ans = S ^ a[i]
    print(ans)

-import numpy as np - -a = np.array(input().split(), np.int64) -S = a[0] -for i in range(1, n): -    S = np.bitwise_xor(S, a[i])  # xor logic -    # print(format(S, 'b')) decimal number→binary number +a = list(map(int, input().split())) +S = 0 -    print((np.bitwise_xor(S, a[i]))) +    S ^= a[i] +for i in range(n): +    ans = S ^ a[i] +    print(ans)