import Data.List

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

solve :: Int -> [Int] -> [Int]
solve n as = scanl f x1 $ take (n-1) as
 where
  f x a = 2 * a - x
  s  = sum as
  x1 = s - 2 * sum (map fst . filter snd $ zip (tail as) (cycle [True, False]))