import sys



sys.setrecursionlimit(10 ** 8)



input = sys.stdin.readline





def main():

    N = int(input())

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



    ans = A[0]

    for a in A[1:]:

        ans ^= a



    for a in A:

        print(a ^ ans, end=" ")





if __name__ == '__main__':

    main()

import sys



sys.setrecursionlimit(10 ** 8)



input = sys.stdin.readline





def main():

    N = int(eval(input()))

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



    s = 0

    for a in A:

        s ^= a

    for a in A:

        print((s ^ a))

    

    



if __name__ == '__main__':

    main()



import sys

sys.setrecursionlimit(10**8)
input = sys.stdin.readline


def main():
    N = int(input())
    A = [int(x) for x in input().split()]
    ans = A[0]
    for a in A[1:]:
        ans ^= a
    for a in A:
        print(a ^ ans, end=" ")


if __name__ == "__main__":
    main()

import sys

sys.setrecursionlimit(10**8)
input = sys.stdin.readline


def main():
    N = int(eval(input()))
    A = [int(x) for x in input().split()]
    s = 0
    for a in A:
        s ^= a
    for a in A:
        print((s ^ a))


if __name__ == "__main__":
    main()

-    N = int(input()) +    N = int(eval(input())) -    ans = A[0] -    for a in A[1:]: -        ans ^= a +    s = 0 -        print(a ^ ans, end=" ") +        s ^= a +    for a in A: +        print((s ^ a))