import           Data.Char                      ( isSpace )
import qualified Data.Vector.Unboxed           as V
import qualified Data.ByteString.Char8         as C

main = do
    n <- readLn :: IO Int
    a <- V.unfoldr (C.readInt . C.dropWhile isSpace) <$> C.getLine
    let zeros   = V.replicate n 0 :: V.Vector Int
        ones    = V.replicate n 1
        indices = V.map pred a
        ans     = V.accumulate_ (+) zeros indices ones
    V.forM_ ans print
