{-# OPTIONS_GHC -O2 #-}

import qualified Data.ByteString.Char8 as C
import Data.Bits
import qualified Data.ByteString.Builder as B
import Data.List
import qualified Data.Vector.Unboxed as U
import System.IO

r :: Int -> IO (U.Vector Int)
r n = U.unfoldrN n (C.readInt . C.dropWhile (==' ')) <$> C.getLine

printV :: (Show a, U.Unbox a) => U.Vector a -> IO ()
printV v =
    let showB = B.string8 . show
    in  B.hPutBuilder stdout $ 
            U.foldl' (\ac a -> ac <> B.char8 ' ' <> showB a) (showB $ U.head v) (U.tail v)
                <> B.char8 '\n'

main :: IO ()
main = do
    n <- readLn
    as <- r n
    let x = U.foldr1' xor as
    printV $ U.map (xor x) as