fun main() {
    readInt()
    val a = readInts().map { it.toLong() }

    val all = a.reduce { acc, l -> acc xor l }
    println(a.map { it xor all }.joinToString(" "))
}

// Input Reader
private fun readLn() = readLine()!!

private fun readStrings() = readLn().trim().split(" ")
private fun readInt() = readLn().toInt()
private fun readInts() = readStrings().map { it.toInt() }
