import Data.List
import Data.List.Split



-- TLE version
-- -- i <- [1..N]
-- -- pointList = [0, A1, ..., AN, 0]
-- calcPathLength pointList n i_canceled =
    -- sum [abs ((pointList !! i_x) - (pointList !! if i_x + 1 == i_canceled then i_x + 2 else i_x + 1)) |
    --     i_x <- [0..n], i_x /= i_canceled]

calcNoCancelLength :: [Int] -> Int -> Int
calcNoCancelLength pointList n =
    sum $ map (\i -> abs((pointList !! i) - (pointList !! (i + 1)))) [0..n]

calcPathLength :: Int -> [Int] -> Int -> Int
calcPathLength noCancelLength pointList i_canceled =
    noCancelLength -
    (abs ((pointList !! (i_canceled - 1)) - (pointList !! i_canceled))) -
    (abs ((pointList !! i_canceled) - (pointList !! (i_canceled + 1)))) +
    (abs ((pointList !! (i_canceled - 1)) - (pointList !! (i_canceled + 1))))

printResult :: [Int] -> Int -> IO ()
printResult pointList n = do
    loop n 1
    where
        noCancelLength = calcNoCancelLength pointList n
        loop :: Int -> Int -> IO ()
        loop n i = do
            print (calcPathLength noCancelLength pointList i)
            if i < n then loop n (i + 1) else return ()

main = do
    n <- readLn :: IO Int
    line2 <- getLine
    -- rawPointList = [A1, A2, ..., AN]
    rawPointList <- return $ map (\el -> read el :: Int) (splitOn " " line2)
    printResult (0 : rawPointList ++ [0]) n
