subordinateN :: Int -> [Int] -> Int
subordinateN i [] = 0
subordinateN i (a:as)
 | a == i     = 1 + subordinateN i as
 | otherwise  = subordinateN i as
 
main = do
    n <- read <$> getLine
    as <- (map read).words <$> getLine
    putStrLn $ unlines $ map (show.(flip subordinateN as)) [1..n]