import sys

def input(): return sys.stdin.readline().strip()

def mapint(): return list(map(int, input().split()))

sys.setrecursionlimit(10**9)



from collections import Counter

N = int(eval(input()))

As = list(mapint())



cum = 0

for a in As:

    cum^=a

A = []

for a in As:

    ans = cum^a

    A.append(str(ans))

print((' '.join(A)))
import sys

def input(): return sys.stdin.readline().strip()

def mapint(): return list(map(int, input().split()))

sys.setrecursionlimit(10**9)



N = int(eval(input()))

As = list(mapint())



ALL = 0

for a in As:

    ALL ^= a

ans = [ALL^a for a in As]

print((*ans))
import sys


def input():
    return sys.stdin.readline().strip()


def mapint():
    return list(map(int, input().split()))


sys.setrecursionlimit(10**9)
from collections import Counter

N = int(eval(input()))
As = list(mapint())
cum = 0
for a in As:
    cum ^= a
A = []
for a in As:
    ans = cum ^ a
    A.append(str(ans))
print((" ".join(A)))

import sys


def input():
    return sys.stdin.readline().strip()


def mapint():
    return list(map(int, input().split()))


sys.setrecursionlimit(10**9)
N = int(eval(input()))
As = list(mapint())
ALL = 0
for a in As:
    ALL ^= a
ans = [ALL ^ a for a in As]
print((*ans))

-from collections import Counter - -cum = 0 +ALL = 0 -    cum ^= a -A = [] -for a in As: -    ans = cum ^ a -    A.append(str(ans)) -print((" ".join(A))) +    ALL ^= a +ans = [ALL ^ a for a in As] +print((*ans))