fun main(args : Array<String>) {
    val n = readLine()!!.toInt()
    val aa = readLine()!!.split(" ").map { it.toInt() }

    val allXor = aa.reduce { acc, i -> acc.xor(i) }
    val ans = mutableListOf<Int>()

    aa.forEach { a ->
        ans.add(a.xor(allXor))
    }

    println(ans.joinToString(separator = " "))
}