const input = require("fs").readFileSync("/dev/stdin", "utf8")

;(input => {

    const lines = input.split('\n')
    const N = lines[0] - 0
    const a = lines[1].split(' ').map(Number)

    let x = a[0]
    for (let i = 1; i < N; i++) {
        x = x ^ a[i]
    }

    let r = x ^ a[0]
    for (let i = 1; i < N; i++) {
        r += ' ' + (x ^ a[i])
    }

    console.log(r)

})(input)
