import           Control.Monad
import           Control.Monad.ST
import           Data.Bits
import qualified Data.ByteString             as B
import           Data.List
import qualified Data.Set                    as S
import           Data.STRef
import qualified Data.Vector                 as V
import qualified Data.Vector.Unboxed         as VU
import qualified Data.Vector.Unboxed.Mutable as VUM


readInt :: IO [Int]
readInt = map read . words <$> getLine

readIntlines :: Int -> IO [[Int]]
readIntlines n = map (map read . words) <$> replicateM n getLine

main :: IO ()
main = do
    n <- readInt
    a <- readInt
    putStrLn . unwords . map show $ solve a

solve :: [Int] -> [Int]
solve xs = let t = foldl1' (\acc x -> xor acc x) xs
            in map (\x -> xor t x) xs
