import Control.Monad
import Data.Bits
import qualified Data.ByteString.Char8 as BS
import Data.List
import Data.Maybe
readInt = fst . fromJust . BS.readInt
readIntList = map readInt . BS.words
getIntList = readIntList <$> BS.getLine

main = do
  getLine
  as <- getIntList
  let all = foldr1 xor as
  mapM_ (print . xor all) as