import qualified Data.Map as M

toInt x = read x :: Int

employeeList n = [1..n]
countList = cycle [0]

countcheck :: [Int] -> M.Map Int Int -> M.Map Int Int
countcheck [] mapEmployeeCount = mapEmployeeCount
countcheck (x:xs) mapEmployeeCount
    = M.update (\x -> Just(x+1)) x $ countcheck xs mapEmployeeCount

main = do
    n <- readLn
    m <- map toInt . words <$> getLine
    let employeeCount = zip (employeeList n) countList
        mapEmployeeCount = M.fromList employeeCount
        checkedEmployeeCount = countcheck m mapEmployeeCount
    mapM_ print $ map snd $ M.toList checkedEmployeeCount