import java.util.*

fun main(args: Array<String>) {
    val reader = Scanner(System.`in`)
    val N = reader.nextInt()
    val xorResults = mutableListOf<Int>()
    val values = mutableListOf<Int>()
    var firstValue = 0
    repeat(N) {
        val readValue = reader.nextInt()
        xorResults.add(readValue)
        if(it != 0){
            firstValue = firstValue.xor(readValue)
        }
    }
    values.add(firstValue)
    for(count in 1..N-1){
        val xorValue = xorResults[count]
        val notFirstAndSelf = xorValue.xor(firstValue)
        values.add(xorResults[0].xor(notFirstAndSelf))
    }
    repeat(N){
        if(it == N -1){
            println("${values[it]}")
        }
        else {
            print("${values[it]} ")
        }
    }
}