import Control.Monad
import Data.Maybe
import qualified Data.ByteString.Char8 as BS
import Data.List

readInt = fst . fromJust . BS.readInt
readIntList = map readInt . BS.words
getInt = readInt <$> BS.getLine
getIntList = readIntList <$> BS.getLine

main = do
    n <- getInt
    as <- (0 :) . (++ [0]) <$> getIntList
    let d1 = zipWith (\a b -> abs (a-b)) as (tail as)
        s = sum d1
        d2 = zipWith (\a b -> abs (a-b)) as (drop 2 as)
        is = zipWith (\a b -> s - a + b) (zipWith (+) d1 (tail d1)) d2
    mapM_ print is