import qualified Data.ByteString.Char8 as BC
import Data.Maybe

readIntsLine :: IO [Int]
readIntsLine = map (fst . fromJust . BC.readInt) . BC.words <$> BC.getLine

calc :: Int -> [Int] -> Int
calc pos [] = abs pos
calc pos (a:as) = abs (a - pos) + calc a as

solve :: Int -> [Int] -> [Int]
solve _ [a1, a2] = []
solve total (a1:a2:a3:as) = res : solve total (a2:a3:as)
  where res = total + abs (a3 - a1) - abs (a3 - a2) - abs (a2 - a1)

main :: IO ()
main = do
  getLine
  as <- readIntsLine
  mapM_ print $ solve (calc 0 as) ([0] ++ as ++ [0])