let ($) f g = fun x -> g (f x)
let split_string ?(pattern="") = Str.split @@ Str.regexp pattern
let n = Scanf.sscanf (read_line ()) "%d" @@ fun n -> n
let a = read_line () |> split_string ~pattern:" " |> List.map int_of_string

let all_xor = List.fold_left (lxor) 0 a

let () = 
  a 
  |> List.map (((lxor) all_xor) $ string_of_int)
  |> String.concat " "
  |> print_endline