import qualified Data.ByteString.Char8 as B

main = do
  getLine
  input <- B.getContents
  let as = map readI . B.words $ input
  mapM_ print (solve as)

readI :: B.ByteString -> Int
readI s = case B.readInt s of Just (n,_) -> n

solve :: [Int] -> [Int]
solve as =
  [total+dt | dt<-map f $ zip bs (zip (tail bs) (tail (tail bs)))]
  where
    bs = 0:as++[0]
    total = sum[ abs(a1-a2) | (a1,a2)<-zip bs (tail bs)]
    f (a1,(a2,a3))  = abs(a1-a3)-abs(a1-a2)-abs(a2-a3)