pairs (x:y:xs) = scanl (\(_, b) c -> (b, c)) (x, y) xs
pairs _ = []
total l = sum $ (abs.uncurry (-)) <$> pairs (0:l++[0])
skips [] = []
skips (x:xs) = xs : fmap (x:) (skips xs)

main = do
  _ <- getLine
  l <- fmap read.words<$>getLine
  mapM_ putStrLn $ fmap (show.total) (skips l)
