import Data.Bits
import qualified Data.ByteString.Char8 as C
import qualified Data.Vector.Unboxed as U

main = C.interact $ put . sol . get

get = U.unfoldr (C.readInt . C.dropWhile (<'0'))

put = C.unwords . fmap (C.pack . show) . U.toList

sol v = U.map (xor p) u
  where
  u = U.tail v
  p = U.foldl1' xor u