import Data.List
import qualified Data.Map as M

makeTable = M.fromList . map (\xs -> (head xs, length xs)) . groupBy (==) . sort
getValue = (maybe 0 id .) . M.lookup

main :: IO ()
main = do
  n <- readLn :: IO Int
  xs <- map read . words <$> getLine
  let t = makeTable xs
  let ys = map (\k -> getValue k t) [1..n]
  putStr $ unlines . map show $ ys