import Control.Monad

main = do
    [n, m] <- map read . words <$> getLine
    abss <- replicateM m $ map read . words <$> getLine :: IO [[Int]]
    mapM_ print $ map (\i -> length $ filter (elem i) abss) [1..n]