
import qualified Data.Vector.Unboxed as V
import qualified Data.ByteString.Char8 as B

import Control.Monad

someFunc = do
  n <- read <$> getLine :: IO Int
  let readInt = (\s -> case B.readInt s of
                Just (x,y) -> if B.null y then Just (x, B.empty) else Just (x, B.tail y)
                Nothing -> Nothing)
  as <- V.unfoldrN n readInt <$> B.getLine
  --let as = V.replicate (n-1) 1
  --putStrLn $ V.foldl (\str2 str1 -> str2 ++ "\n" ++ show str1) "" $ count n as
  V.forM_ (count n as) $ \i ->
    print i
  return ()

  where
    count :: Int -> V.Vector Integer -> V.Vector Integer
    count n xs = V.foldr (\x after -> after V.// [((x-1), (after V.! (x-1)) + 1)]) (V.replicate n 0) xs