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


def cal_xor(xor_list, rm_ind):
    ans = None
    for i, xi in enumerate(xor_list):
        if i!=rm_ind:
            if ans is not None:
                ans = ans^xi
            else:
                ans = xi
    return ans

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

ans_str = ''

if N==2:
    print("{} {}".format(a[1], a[0]))
else:

    xors = []
    for i in range(N//2):
        xors.append(a[2*i]^a[2*i+1])

    for i, ai in enumerate(a):
        sum_xor = cal_xor(xors, i//2)
        if i%2==0:
            ind = i+1
        else:
            ind = i-1

        ans = sum_xor^a[ind]
        ans_str += str(ans)+' '
    print(ans_str[:-1])
