{-# OPTIONS_GHC -O #-}
{-# LANGUAGE OverloadedStrings #-}

import Control.Monad
import qualified Data.ByteString.Char8 as B
import qualified Data.Vector.Storable as V
import qualified Data.Vector.Storable.Mutable as MV

main = do
    n <- readLn
    ps <- (flip V.snoc) 0.V.cons 0.V.unfoldr (B.readInt.B.dropWhile (==' ')) <$> B.getLine
    --
    let suma = V.sum $ V.map (\i -> c ps i (i-1)) $ V.fromList [1..n+1]
    --
    forM_ [1..n] $ \i -> do
        print $ suma - (c ps i (i-1)) - (c ps i (i+1)) + (c ps (i+1) (i-1))
    --
    where c ps i j = abs((ps V.! j) - (ps V.! i))
