open Batteries
let n = read_int ()
let a = read_line () |> String.split_on_char ' ' |> List.map int_of_string
let all = List.fold_left (fun a b -> a lxor b) 0 a
let rec loop lst =
  match lst with
  | [] -> print_string "\n"
  | first :: rest ->
    Printf.printf "%d " (all lxor first); loop rest
let _ = loop a