import Data.List

main :: IO ()
main = do
  n <- readLn :: IO Int
  as <- map read . words <$> getLine :: IO [Integer]
  putStrLn . unwords . map show $ solve n as

solve n as = map (2*) $ x1 : (reverse . tail $ scanl' (\acc x -> x - acc) x1 . reverse $ tail as)
  where
    evens = map fst . filter (\(_, i) -> even i) $ zip as [1..]
    x1 = (sum as) `div` 2 - sum evens
