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

main = put =<< sol <$> (C.getLine *> get)

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

put = putStrLn . unwords . fmap show . U.toList

sol = U.map =<< xor . U.foldl1' xor