import qualified Data.ByteString.Char8 as BS
import Data.Char
import Data.List
import Data.Bits

main = do
  BS.getLine
  li <- BS.getLine
  let as = unfoldr (BS.readInt . BS.dropWhile isSpace) li
  let ans = compute as
  putStrLn $ unwords $ map show ans

compute :: [Int] -> [Int]
compute as = map (xor total) as
  where
    total = foldl1' xor as
