solve :: Int -> [Int] -> [Int] -> [Int]
solve n aList ans
 | aList == [] = 0:ans
 | otherwise = solve (n+1) (tail aList) $ ((length . (filter (\x -> x == n))) aList):ans

main = do
 _ <- getLine
 aList <- map read . words <$> getLine :: IO [Int]
 let bList = solve 1 aList [] 
 mapM_ print $ reverse bList
