import qualified Data.List as L
import Data.Functor((<$>))

solve (0:_) res = reverse res
solve (x:xs) res =
  let (as, bs) = splitAt x xs
      sortedList = L.sort as
      diff = zipWith (\x y -> y-x) sortedList (tail sortedList) in
      solve bs (minimum diff : res)

main :: IO ()
main = do
  ls <- (map read . words) <$> getContents :: IO [Int]
  mapM_ (putStrLn . show) $ solve ls []
