There are N Snuke Cats numbered 1, 2, \ldots, N, where N is even.
Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written.
Recently, they learned the operation called xor (exclusive OR).What is xor?

For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x_2~\textrm{xor}~\ldots~\textrm{xor}~x_n is defined as follows:

 -  When x_1~\textrm{xor}~x_2~\textrm{xor}~\ldots~\textrm{xor}~x_n is written in base two, the digit in the 2^k's place (k \geq 0) is 1 if the number of integers among x_1, x_2, \ldots, x_n whose binary representations have 1 in the 2^k's place is odd, and 0 if that count is even. 
For example, 3~\textrm{xor}~5 = 6.


They wanted to use this operation quickly, so each of them calculated the xor of the integers written on their scarfs except his scarf.
We know that the xor calculated by Snuke Cat i, that is, the xor of the integers written on the scarfs except the scarf of Snuke Cat i is a_i.
Using this information, restore the integer written on the scarf of each Snuke Cat.

-----Constraints-----
 - All values in input are integers.
 - 2 \leq N \leq 200000
 - N is even.
 - 0 \leq a_i \leq 10^9
 - There exists a combination of integers on the scarfs that is consistent with the given information.

-----Input-----
Input is given from Standard Input in the following format:
N
a_1 a_2 \ldots a_N

-----Output-----
Print a line containing N integers separated with space.
The i-th of the integers from the left should represent the integer written on the scarf of Snuke Cat i.
If there are multiple possible solutions, you may print any of them.

-----Sample Input-----
4
20 11 9 24

-----Sample Output-----
26 5 7 22

 - 5~\textrm{xor}~7~\textrm{xor}~22 = 20
 - 26~\textrm{xor}~7~\textrm{xor}~22 = 11
 - 26~\textrm{xor}~5~\textrm{xor}~22 = 9
 - 26~\textrm{xor}~5~\textrm{xor}~7 = 24
Thus, this output is consistent with the given information.

Starter code:

Solutions:
n=int(input())
a=list(map(int,input().split()))

X=[]
b=a[0]
for i in range(1,n) :
    b^=a[i]

for i in range(n) :
    x=b^a[i]
    X.append(x)

for i in X :
    print(i,end=" ")


def main():
    N = int(input())
    A = list(map(int, input().split()))

    scarf_0 = 0
    for a in A[1:]:
        scarf_0 ^= a
    
    scarf_all = scarf_0 ^ A[0]
    
    ans = [scarf_all^a for a in A]
    
    print(*ans, sep=" ")

def __starting_point():
    main()
__starting_point()

#!/usr/bin/env python3

#import
#import math
#import numpy as np
N = int(input())
A = list(map(int, input().split()))

t = 0
for a in A:
    t = t ^ a

ans = [str(t ^ A[i]) for i in range(N)]

print(" ".join(ans))

N = int(input())
a = list(map(int,input().split()))
ans = []
x = a[0]
for i in range(1,N):
    x ^= a[i]
for i in a:
    ans.append(x^i)
print(*ans)

N = int(input())
List = list(map(int,input().split()))
total = List[0]
for i in range(1,N):
  total = total^List[i]
ans = []
for i in range(N):
  ans.append(List[i]^total)
print(*ans)

import sys
input = sys.stdin.readline

def main():
    N = int(input())
    a = list(map(int, input().split()))

    s = 0
    for i in a:
        s ^= i
    
    for i in a:
        ans = s ^ i
        print(ans, sep=' ', end=' ')

main()

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

for i in range(n):
    print(sub ^ a[i],end = ' ')



N = int(input())
A = list(map(int, input().split()))
 
XOR = 0
for a in A:
  XOR ^= a
for i in range(N):
  A[i] = A[i]^XOR
print(*A)

n = int(input())
al = list(map(int, input().split()))
a_xor = al[0]
for i in range(1, n):
    a_xor^=al[i]

ans = []
for a in al:
    ans.append(a_xor^a)

print(*ans)

_,*A=map(int,open(s:=0).read().split())
for a in A:s^=a
print(*[a^s for a in A])

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


N = int(input())
Alist = list(map(int,input().split()))
XorPro = 0
for i in Alist:
    XorPro = XorPro^i
Answer = []
for i in Alist:
    Answer.append(XorPro^i)
print(*Answer)

from functools import reduce
from operator import xor

N, *A = map(int, open(0).read().split())
B = reduce(xor, A)
print(*map(lambda a: B^a, A))

n = int(input())
a_ls = list(map(int, input().split()))
s_ls = [0] * n
Sum = 0
for i in range(n):
    Sum = Sum ^ a_ls[i]
for i in range(n):
    s_ls[i] = Sum ^ a_ls[i]
print(*s_ls)

N = int(input())
a_list = list(map(int, input().split()))
all_xor = 0
res = []

for a in a_list:
    all_xor ^= a

for a in a_list:
    res.append(a ^ all_xor)

print((*res))


import sys

input = sys.stdin.readline

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

all = 0
for a_i in A:
    all ^= a_i

ans = []
for a_i in A:
    ans.append(all ^ a_i)

print(*ans)

n=int(input())
A=list(map(int,input().split()))
aa=0
for i in A:
	aa^=i
ans=[0]*n
for i in range(n):
	ans[i]=aa^A[i]
print((' '.join(map(str,ans))))


import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time, copy,bisect
#from operator import itemgetter
#from heapq import heappush, heappop
#import numpy as np
#import sympy
#from scipy.sparse.csgraph import breadth_first_order, depth_first_order, shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson
#from scipy.sparse import csr_matrix
from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN
import sys

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

stdin = sys.stdin

ni = lambda: int(ns())
nf = lambda: float(ns())
na = lambda: list(map(int, stdin.readline().split()))
nb = lambda: list(map(float, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

N = ni()
a = na()
num = a[0]
for i in range(1, N):
    num ^= a[i]
ans = []
for i in range(N):
    ans.append(num^a[i])
print(*ans)

#!/usr/bin/env python3
import sys
from itertools import chain

# form bisect import bisect_left, bisect_right, insort_left, insort_right
# from collections import Counter
# import numpy as np


def solve(N: int, A: "List[int]"):
    total = 0
    for a in A:
        total ^= a
    return [total ^ a for a in A]


def main():
    tokens = chain(*(line.split() for line in sys.stdin))
    # N, a = map(int, line.split())
    N = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    ans = solve(N, A)
    print((" ".join([str(a) for a in ans])))


def __starting_point():
    main()

__starting_point()

N=int(input())
A=list(map(int,input().split()))
allxor=A[0]
for j in range(1,N):
    allxor^=A[j]
ans=[]
for i in range(N):
    ans.append(allxor^A[i])
print(*ans,sep=" ")

N=int(input())
a=list(map(int,input().split()))
x=0
for i in range(N):
    x^=a[i]

for i in range(N):
    print(x^a[i],end=' ')
print()


n = int(input())
arr = list(map(int, input().split()))

a = 0

for i in range(n):
    a ^= arr[i]

ans = []
for i in range(n):
    ans.append(a ^ arr[i])

print(*ans)

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

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

ans=[]
for j in range(n):
    tmp = s^a[j]
    ans.append(tmp)

print(*ans)

'''
Created on 2020/09/03

@author: harurun
'''
def main():
  import sys
  pin=sys.stdin.readline
  pout=sys.stdout.write
  perr=sys.stderr.write
  
  N=int(pin())
  a=list(map(int,pin().split()))
  s=0
  for i in a:
    s=s^i 
  ansl=[]
  for j in a:
    ansl.append(str(s^j))
  ans=" ".join(ansl)
  print(ans)
  return 
main()

N = int(input())
A = list(map(int, input().split()))
all_xor = 0
for a in A:
    all_xor ^= a

for i in range(N):
    ans = all_xor ^ A[i]
    print(ans, end=" ")
print()

input();A=[*map(int,input().split())];s=0
for a in A:s^=a
print(*[a^s for a in A])

n = int(input())
arr = list(map(int, input().split()))
x = 0
for i in arr:
	x ^= i
print(*(list(map(lambda y: x ^ y, arr))))

from functools import reduce

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

B = reduce(lambda x, y: x^y, A)

ans = []
for a in A:
    ans.append(B^a)

print(*ans)

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

s = 0
for x in a:
    s ^= x

ans = []
for x in a:
    ans.append(s ^ x)

print(*ans)

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

tot=0
for i in range(n): tot^=a[i];
for i in range(n): a[i]^=tot;
print(*a)

n = int(input())
a = list(map(int, input().split(" ")))
mas = 0
for i in a:
  mas ^= i
ans = []
for i in a:
  ans.append(mas ^ i)
print(*ans)

n=int(input())
a=list(map(int,input().split()))
tmp=0
for x in a:
    tmp^=x
ans=[]
for i in range(n):
    ans.append(a[i]^tmp)
print(*ans)

n = int( input() )
a = list( map(int, input().split()) )
x = 0
for i in a:
    x ^= i
print( * list( map( lambda y: x^y , a ) ) )

import math
ini = lambda : int(input())
inm = lambda : map(int,input().split())
inl = lambda : list(map(int,input().split()))
gcd = lambda x,y : gcd(y,x%y) if x%y else y
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])
    if arr==[]:
        arr.append([n, 1])
    return arr
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    divisors.sort()
    return divisors
class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n
 
    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]
 
    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)
 
        if x == y:
            return
 
        if self.parents[x] > self.parents[y]:
            x, y = y, x
 
        self.parents[x] += self.parents[y]
        self.parents[y] = x
 
    def size(self, x):
        return -self.parents[self.find(x)]
 
    def same(self, x, y):
        return self.find(x) == self.find(y)
 
    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]
 
    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]
 
    def group_count(self):
        return len(self.roots())
 
    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}
 
    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())
mod = 10**9 + 7

#--maincode----------------

n = ini()
a = inl()
A = 0
for x in a:
    A ^= x
for x in a:
    print(A^x,end=" ")

import numpy as np
from numpy import int64

f = open(0)
N = int(f.readline())
a = np.fromstring(f.readline(), dtype=int64, sep=' ')
z = np.bitwise_xor.reduce(a)
ans = np.bitwise_xor(a, z)
print(*ans.tolist())

from functools import reduce
from operator import xor

N = int(input())
*A, = map(int, input().split())
Z = reduce(xor, A)
print(*[Z^a for a in A])

N=int(input())
a=list(map(int,input().split()))
B=a[0]
for i in range(1,N):B^=a[i]
print(' '.join([str(B^i)for i in a]))

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

total = 0
for a in A:
    total ^= a

for a in A:
    print(total^a, end=" ")

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

n = int(input())
a = list(map(int, input().split()))
all_xor = 0
for i in a:
    all_xor ^= i
l = []
for j in a :
    ans = all_xor ^ j
    l.append(ans)
print((*l))


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

s = 0
for i in range(n):
	s = s ^ a[i]
	
for i in range(n):
	x = s ^ a[i]
	print(x, end='')
	if i == n - 1:
		print('')
	else:
		print(' ', end='')

N = int(input())
A = list(map(int, input().split()))
count = 0
for i in A:
    count ^= i
for i in range(len(A)):
    A[i] ^= count
    
    
print(*A)

#排他的論理和 x^y
n=int(input())
a=list(map(int,input().split()))
k=0
for i in range(0,n-1,2):
  k=k^a[i]^a[i+1]

for i in range(n):
  print(k^a[i],end=" ")
  
  
  
  

from functools import reduce
from operator import xor

# via https://drken1215.hatenablog.com/entry/2020/06/22/122500

N, *A = map(int, open(0).read().split())
B = reduce(xor, A)
print(*map(lambda a: B^a, A))

n=int(input())
a=list(map(int,input().split()))
s=a[0]
for i in a[1:]:
  s^=i
  
ans=''

for i in a:
  x=s^i
  ans+=str(x)
  ans+=' '

print((ans[:-1]))


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

cnt=0
for i in range(N):
    cnt=cnt^a[i]

B=[]*N
for i in range(N):
    ans=cnt^a[i]
    B.append(str(ans))

print(' '.join(B))

n = int(input())
a = list(map(int, input().split()))
b=0
for i in range(n):
    b ^= a[i]
ans = []
for i in range(n):
    ans.append(b^a[i])
print(' '.join(list(map(str, ans))))

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

b = 0
for i in range(n):
  b ^= a[i]
x = []
for i in range(n):
  x.append(b^a[i])
print (*x)

def main():
    N = int(input())
    a = list(map(int, input().split()))
 
    total = 0
    for other in a:
        total ^= other
 
    print(*[(other ^ total) for other in a])
 
 
def __starting_point():
    main()
__starting_point()

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


N = int(input())
A = list(map(int, input().split()))
b = 0
for x in A:
    b ^= x
for i in range(len(A)):
    A[i] ^= b
print(*A)

N = int(input())
A = list(map(int, input().split()))
res = 0
for i in range(N):
    res ^= A[i]
ans = [a ^ res for a in A]
print(*ans)

# -*- coding:utf-8 -*-

def solve():
    """
    スカーフをそれぞれs[1]...s[N]とする
    Nは偶数より、
    必ず a[1]^...^a[N] = s[1]^...^s[N] (=Sと置く) になる。

    よって、s[1]が求めたかったら、s[1] = S ^ a[1]で求められる。
    """
    import sys
    N = int(sys.stdin.readline())
    As = list(map(int, sys.stdin.readline().split()))

    S = 0
    for a in As:
        S ^= a

    # 答え
    anss = []
    for i in range(N):
        anss.append(str(S^As[i]))

    ans = " ".join(anss)
    print(ans)


def __starting_point():
    solve()

__starting_point()

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

n = int(input())
lis = list(map(int, input().split()))

t = lis[0]
for i in range(1, n):
    t ^= lis[i]

ans = [0] * n
for i , j in enumerate(lis):
    ans[i] = t ^ j

print(*ans)


def main():
    n = int(input())
    a = list(map(int, input().split(" ")))
    all = 0
    for ele in a:
        all ^= ele
    for ele in a:
        print(all ^ ele,end = " ")
    print()



def __starting_point():
    main()
__starting_point()

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

# import sys
# sys.setrecursionlimit(10 ** 6)
# import bisect
# from collections import deque
# from decorator import stop_watch
# 
# 
# @stop_watch
def solve(N, As):
    all_xor = 0
    for A in As:
        all_xor ^= A
    ans = ''
    for A in As:
        ans += str(A ^ all_xor) + ' '
    print((ans[:-1]))


def __starting_point():
    # S = input()
    N = int(input())
    # N, M = map(int, input().split())
    As = [int(i) for i in input().split()]
    # Bs = [int(i) for i in input().split()]
    solve(N, As)

__starting_point()

N = int(input())
A = list(map(int,input().split()))
X = 0
for a in A:
    X ^= a
print((*[X^a for a in A]))


import math
from math import gcd,pi,sqrt
INF = float("inf")
MOD = 10**9 + 7

import sys
sys.setrecursionlimit(10**6)
import itertools
import bisect
from collections import Counter,deque
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]


def main():
    N = i_input()
    A = i_list()

    X = A[0]
    for i in range(1,N):
        X^=A[i]

    for i in range(N):
        print(X^A[i], end=" ")

def __starting_point():
    main()
__starting_point()

import sys
input = sys.stdin.readline

#l = list(map(int, input().split()))
#import numpy as np
#arr = np.array([int(i) for i in input().split()])
'''
a,b=[],[]
for i in range():
    A, B = map(int, input().split())
    a.append(A)   
    b.append(B)'''

n=int(input())
a=list(map(int,input().split()))
x=0
for item in a:
    x^=item
ans=[]
for item in a:
    ans.append(x^item)
ans=map(str,ans)
print(" ".join(ans))

import sys
from collections import deque
input = sys.stdin.readline

def main():
    n = int( input() )
    input_a = list ( map( int, input().split() ) )
    a = deque( input_a )

    while( len(a) != 1 ):
        x = a.popleft()
        y = a.popleft()
        z = x ^ y
        a.append(z)
    sum = a.popleft()
    ans = []
    for i in input_a:
        x = i ^ sum
        ans.append(x)

    for i in ans:
        print( i , end = ' ' )



main()

N = int(input())
A = list(map(int,input().split()))
sum_xor = A[0]

for i in range(1,N):
  sum_xor ^= A[i]
  
for j in range(N):
  print(sum_xor ^ A[j], end=" ")

from functools import reduce
from operator import xor
N = int(input())
A = list(map(int, input().split()))

XorA = reduce(xor, A)

B = []
for a in A:
    B.append(XorA ^ a)

print(*B)

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

x = a[0]
for i in a[1:]:
    x ^= i

for i in a:
    print(x^i, end=" ")

N = int(input())
A = list(map(int, input().split()))
all = 0
for a in A:
  all = all ^ a
ans = []
for a in A:
  ans.append(all ^ a)
print(*ans)

N=int(input())
*A,=map(int,input().split())

total=0
for i in range(N):
  total ^= A[i]
  
print(*[total^A[i] for i in range(N)])

_,*A=map(int,open(0).read().split());s=A[0]
for a in A[1:]:s^=a
print(*[a^s for a in A])

N = int(input())
lst = list(map(int, input().split()))
sx = lst[0]
for i in range(1, N):
	sx = sx^lst[i]
print(*[i^sx for i in lst])

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

b = 0
for i in a:
    b ^= i

ans = []
for i in a:
    ans.append(b ^ i)
print((" ".join(map(str, ans))))


#!/usr/bin/env python3

def main():
    n = int(input())
    a = list(map(int, input().split()))
    ans = [None] * n
    allxor = 0
    for i in range(n):
        allxor ^= a[i]
    for i in range(n):
        ans[i] = allxor ^ a[i]
    print((*ans))


def __starting_point():
    main()

__starting_point()

n=int(input())
a=list(map(int,input().split()))
wa=a[0]^a[1]
for i in range(2,n):
  wa=wa^a[i]
ans=[]
for i in range(n):
  ans.append(wa^a[i])
print(*ans)

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

N = int(input())
A = list(map(int,input().split()))
X = 0
for i in range(N):
  X = X^A[i]
ans = []
for i in range(N):
  temp = X^A[i]
  ans.append(temp)
print(*ans)

import sys
input = sys.stdin.readline

# E - Red Scarf
N = int(input())
a = list(map(int, input().split()))

xor = a[0]

for i in range(1, N):
  xor ^= a[i]

ans = []

for i in range(N):
  ans.append(xor ^ a[i])

print(' '.join(map(str, ans)))

n = int(input())
A = list(map(int, input().split()))
X = A[0]
for a in A[1:]:
    X = X ^ a
for i in range(n):
    A[i] = str(X ^ A[i])
print(" ".join(A))

N = int(input())
A = [int(i) for i in input().split()]
total = 0
for a in A:
    total ^= a
print(*[total^a for a in A])

import sys

# E - Red Scarf
N = int(input())
a = list(map(int, input().split()))

xor = a[0]

for i in range(1, N):
  xor ^= a[i]

ans = []

for i in range(N):
  ans.append(xor ^ a[i])

print(' '.join(map(str, ans)))

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

s = a[0]
for i in a[1:]:
  s ^= i

ans = []
for i in a:
  ans.append(s ^ i)

print((*ans))


N=int(input())
A=[int(x) for x in input().split()]
allxor=A[0]
for j in range(1,N):
    allxor^=A[j]
ans=[0]*N
for i in range(N):
    ans[i]=allxor^A[i]
print(*ans,sep=" ")

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

s = a[0]
for i in range(1,n):
  s ^= a[i]

ans = [0]*n
for j in range(n):
  ans[j] = s ^ a[j]

print(*ans)

def main():
    N = int(input())
    A = [int(a) for a in input().split()]
    xor_all = A[0]
    
    for i in range(1, N):
        xor_all ^= A[i]

    for i in range(N):
        if i != N - 1:
            print(A[i]^xor_all, end=" ")
        else:
            print(A[i]^xor_all)

def __starting_point():
    main()
__starting_point()

N = int(input())
A = list(map(int, input().split()))
all = 0
for a in A:
    all ^= a
for a in A:
    print(all ^ a, end=" ")


import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    n = int(input())
    A = list(map(int,input().split()))
    B = [0] * n
    x = 0
    for a in A:
        x ^= a
    for i in range(n):
        B[i] = x^A[i]
    print(" ".join(map(str,B)))


def __starting_point():
    main()
__starting_point()

import sys
from collections import deque, defaultdict, Counter
from itertools import accumulate, product, permutations, combinations
from operator import itemgetter
from bisect import bisect_left, bisect_right
from heapq import heappop, heappush
from math import ceil, floor, sqrt, gcd, inf
from copy import deepcopy
import numpy as np
import scipy as sp

INF = inf
MOD = 1000000007

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

tmp = A[0]
res = 0

for i in range(1, n):
    tmp ^= A[i]
res = [tmp ^ A[i] for i in range(n)]
res = " ".join([str(r) for r in res])

print(res)


def e_red_scarf():
    from functools import reduce
    N = int(input())
    A = [int(i) for i in input().split()]

    total = reduce(lambda x, y: x ^ y, A)
    ans = [a ^ total for a in A]
    return ' '.join(map(str, ans))

print(e_red_scarf())

import sys

input = sys.stdin.readline

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

total = 0

for i in range(n):
	if i == 0:
		total = a[i]
	else:
		total = total ^ a[i]
		
b = []
for i in range(n):
	b.append(str(a[i] ^ total))

print(' '.join(b))

N  = int(input())
As = list(map(int,input().split()))
array = []
B = 0
for i in range(N):
    B ^= As[i]
ans_array = []
for i in range(N):
    ans_array.append(B^As[i])
print(*ans_array)

from functools import reduce
N = int(input())
A = list(map(int, input().split()))
m = reduce(lambda a, b: a^b, A)
l = list(map(str, [a ^ m for a in A]))
ans = ' '.join(l)
print(ans)

N = int(input())
a = [int(s) for s in input().split()]
b = a[0]
c = []
for i in range(1,N):
  b = b ^ a[i]

for i in range(N):
  c.append(str(b ^ a[i]))
 
d = ' '.join(c)

print(d)

N = int(input())
A = list([int(x) for x in input().split()])

xor_base = A[0]
for a in A[1:]:
    xor_base ^= a

result = []
for a in A:
    result.append(a ^ xor_base)

print((*result))


n = int(input())
a = list(map(int, input().split()))
from functools import reduce
from operator import xor
xorsum = reduce(xor, a)
print(*[x^xorsum for x in a])