import qualified Data.ByteString.Char8 as B
import qualified Data.Vector.Unboxed as VU
import Data.Char
import Control.Monad

dist :: VU.Vector Int -> Int
dist xs
    | VU.length xs == 1 = 0
    | otherwise = (abs $ f - s) + dist (VU.tail xs)
    where
        f = VU.head xs
        s = xs VU.! 1

main = do
    n <- readLn :: IO Int
    xs <- VU.unfoldrN n (B.readInt . B.dropWhile isSpace)  <$> B.getLine
    let xs' = VU.cons 0 $ VU.snoc xs 0
    let d = dist xs'
    forM_ [1..n] $ \i -> do
        let curr = xs' VU.! i
        let prev = xs' VU.! (i - 1)
        let next = xs' VU.! (i + 1)
        let ans = (abs $ next - prev) - ((abs $ prev - curr) + (abs $ curr - next))
        print $ d + ans