main :: IO ()
main = do
    n <- readLn
    points <- map read . words <$> getLine
    let allPoints = 0 : (points ++ [0])
    let totalDist = sum $ calcDist allPoints
    let fellPointsTotal =  map (calcFellDist totalDist allPoints) [1..n]
    mapM_ print fellPointsTotal

calcDist :: [Int] -> [Int]
calcDist [] = []
calcDist [x] = []
calcDist (x:y:s) = (dist x y) : calcDist (y:s)

dist :: Int -> Int -> Int
dist x y = abs $ x - y
    
calcFellDist :: Int -> [Int] -> Int -> Int
calcFellDist total lis i = total - distStopAt + dist (lis !! (i+1)) (lis !! (i-1))
    where distStopAt = (dist (lis !! i) (lis !! (i - 1))) + (dist (lis !! i) (lis !! (i + 1)))
