import Data.Char
import Control.Monad

import qualified Data.Vector as V
import qualified Data.Vector.Mutable as VM

import qualified Data.ByteString.Char8 as BS
import Data.Maybe

import Data.Bits

getInts = map (fst . fromJust . BS.readInt) . BS.words <$> BS.getLine


main :: IO ()
main = do
  BS.getLine
  a <- getInts
  
  let x = foldl xor 0 a

  forM_ a $ \i -> do
    print $ x `xor` i
