import           Control.Monad
import           Data.Array

main = do
  _ <- getLine
  xs <- map read . words <$> getLine
  solve xs

solve xs =
  let
    xs_ = (0:xs ++ [0])

    f [_]      = 0
    f (x:y:xs) = abs (x-y) + f (y:xs)

    total =
      f xs_

    xs' =
      listArray (0, length xs + 1) xs_
  in
    forM_ [1..(length xs)] $ \ i ->
      let
        a = xs'!(i-1)
        b = xs'!i
        c = xs'!(i+1)
      in
        print $ total + abs (a - c) - (abs (a - b) + abs (b - c))
