main :: IO ()
main = do
    n <- readLn :: IO Int
    points <- map read . words <$> getLine
    let allPoints = 0 : (points ++ [0])
    let totalDist = sum $ calcDist allPoints
    let fellPointsTotal =  map (+totalDist) $ zipWith (-) (distsNotStopAt allPoints) (distsStopAt allPoints)

    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

distsStopAt :: [Int] -> [Int]
distsStopAt [] = []
distsStopAt (a:b:c:xs) = ((dist a b) + (dist b c)) : (distsStopAt (b:c:xs))
distsStopAt lis = []
    
distsNotStopAt :: [Int] -> [Int]
distsNotStopAt [] = []
distsNotStopAt (a:b:c:xs) = (dist a c) : (distsNotStopAt (b:c:xs))
distsNotStopAt lis = []

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)))
