import sys

import itertools

sys.setrecursionlimit(1000000000)

from heapq import heapify,heappop,heappush,heappushpop

import math

import collections

import copy





if __name__ == "__main__":

    n = int(eval(input()))

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

    b = a[0]

    for i in range(1,n):

        b = b^a[i]

    for i in range(n):

        print((a[i]^b))
import sys

import itertools

sys.setrecursionlimit(1000000000)

from heapq import heapify,heappop,heappush,heappushpop

import math

import collections

import copy



def main():

    n = int(eval(input()))

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

    b = a[0]

    for i in range(1,n):

        b = b^a[i]

    ans = []

    for i in range(n):

        ans.append(b^a[i])

    print((*ans))

if __name__ == "__main__":

    main()
import sys
import itertools

sys.setrecursionlimit(1000000000)
from heapq import heapify, heappop, heappush, heappushpop
import math
import collections
import copy

if __name__ == "__main__":
    n = int(eval(input()))
    a = list(map(int, input().split()))
    b = a[0]
    for i in range(1, n):
        b = b ^ a[i]
    for i in range(n):
        print((a[i] ^ b))

import sys
import itertools

sys.setrecursionlimit(1000000000)
from heapq import heapify, heappop, heappush, heappushpop
import math
import collections
import copy


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


if __name__ == "__main__":
    main()

-if __name__ == "__main__": + +def main(): +    ans = [] -        print((a[i] ^ b)) +        ans.append(b ^ a[i]) +    print((*ans)) + + +if __name__ == "__main__": +    main()