
import Debug.Trace
import Data.Array
import Data.List

get :: IO (Int, Array Int Int)
get = do
  n <- read <$> getLine
  ary <- (listArray (1,n) . map read . words) <$> getLine
  pure (n, ary)

maximum' as = foldl1 (\(i,x) (j,y) -> if x > y then (i,x) else (j,y)) $ assocs as
minimum' as = foldl1 f $ assocs as
  where
    f (i,x) (j,y)
      | x <= 0 = (j,y)
      | y <= 0 = (i,x)
      | x > y = (j,y)
      | otherwise = (i,x)

solve' n ary = map (\i -> length $ filter (i <=) $ elems ary) $ [1 .. n]

main = do
  as <- uncurry solve' <$> get
  mapM_ print as 
