
count n (x:xs)
	| n == x = 1 + count n xs
	| otherwise = count n xs
count _ [] = 0

solve as = map (\n -> count n as) [1..1 + length as]

main :: IO ()
main = do
	_ <- getLine
	input <- getLine
	mapM_ (putStrLn . show) $ solve . map (read) $ words input
