-- FileName   : 163c
-- CreatedDate: 2020-04-19 21:49:49

import Control.Monad
import Data.List
import Data.Ord
import Data.Maybe

elemCountOnce :: Eq a => [a] -> [(a, Int)]
elemCountOnce [] = []
elemCountOnce (x:xs) = (x, (length $ filter (== x) xs) + 1) : elemCountOnce (filter (/= x) xs)

main = do
   n <- read <$> getLine
   a <- getIntList
   let apairs = elemCountOnce a
   mapM_ print $ map (\x-> if elem x a then fromJust $ lookup x apairs else 0) [1..n]


--------------------------------------------
getIntList        = map (read :: String -> Int) . words <$> getLine
getIntegerList    = map (read :: String -> Integer) . words <$> getLine
getIntegerListN m = map (read :: String -> Integer) <$> replicateM m getLine


base :: Integer
base = 1000000007

plus :: Integer -> Integer -> Integer
plus a b = (a+b) `mod` base

times :: Integer -> Integer -> Integer
times a b = a * b `mod` base

minus :: Integer -> Integer -> Integer
minus a b
   | a < b     = a-b + base
   | otherwise = a-b

power :: Integer -> Integer -> Integer
power n k
   | k == 0         = 1
   | k `mod` 2 == 0 = power (times n n) (k`div`2)
   | otherwise      = times n $! power n (k-1)

inv :: Integer -> Integer
inv n = power n $ base - 2

binom :: Integer -> Integer -> Integer
binom n m
   | (n-m) < m = times (foldr times 1 [m+1..n]) $ inv $ foldr times 1 [1..n-m]
   | otherwise = times (foldr times 1 [n-m+1..n]) $ inv $ foldr times 1 [1..m]
