{-# LANGUAGE TypeApplications #-}

import           Control.Monad
import           Control.Applicative
import           Data.List
import           Data.Char
import           Control.Arrow
import           Data.Bits

main = do
  n <- readLn @Int
  a <- map (read @Int) . words <$> getLine
  let snuke = foldl1 xor a
  mapM_ (print . xor snuke) a
