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

let all = List.fold_left (lxor) (List.hd aa) (List.tl aa)

let () = aa |> List.map (fun i -> all lxor i) |> List.map string_of_int |> String.concat " " |> print_endline