import Data.List
import Data.Maybe
import Control.Monad
import qualified Data.ByteString.Char8 as C

readInt' = fst.fromJust.C.readInt
readLnInt = map readInt'.C.words<$>C.getLine
readCsInt n = concat<$>replicateM n readLnInt

x ? (a,b) = if x then a else b
a~>(f,x) = [a] ++ (null x)?(f,x)

main = do
 [n] <- readLnInt
 inputs <- readLnInt
 putStr.unlines.map show $ solve n inputs

solve :: Int -> [Int] -> [Int]
solve n as = f n 1 (group(sort as))

f :: Int -> Int -> [[Int]] -> [Int]
f n t as@(ai:ajs)
 | t>n = []
 | t==head ai = [length ai] ++ f n (t+1) ajs'
 | otherwise = [0] ++ f n (t+1) as where
    ajs' = (null ajs)?([[0]],ajs)
