object Main extends App {
  val in = new java.util.Scanner(System.in)
  val N = in.nextInt
  val As = Array.fill(N)(in.nextInt)
  val xor = As.reduceLeft(_ ^ _)
  println(As.map(_ ^ xor).mkString(" "))
}