
changeElem :: [a] -> a -> Int -> [a]
changeElem as a n = (take n as) ++ [a] ++ (drop (n + 1) as)

incElem :: [Int] -> Int -> [Int]
incElem as n = changeElem as (1 + as !! n) n

solve :: Int -> [Int] -> [Int]
solve n (a:as) = zipWith (+) (solve n as) (incElem nSub (a - 1))
	where nSub = take n [0, 0..1]
solve n [] = take n [0, 0..1] 


main :: IO ()
main = do
	nStr <- getLine
	input <- getLine
	mapM_ (putStrLn) $ map (show) . solve (read nStr) . map (read) $ words input
