import Foundation

func readWords<T>(_ f: (Substring) -> T) -> [T] {
    return readLine()!.split(separator: " ").map(f)
}


let _ = {
    let n = Int(readLine()!)!
    let A = readWords { Int($0)! }

    let total = A.reduce(0, ^)
    print(A.map { (total^$0).description }.joined(separator: " "))
}()