import qualified Data.ByteString.Char8 as BS
import Control.Monad
import Data.List
import Data.Array.ST
import Data.Array (elems)
import Data.Maybe (fromJust)

solve :: Int -> [[Int]] -> [Int]
solve n a = elems $ runSTArray $ do
    arr <- newArray (1, n) 0
    forM_ a $ \i -> do
        let (a:b:_) = i
        va <- readArray arr a
        writeArray arr a (va + 1)
        vb <- readArray arr b
        writeArray arr b (vb + 1)
    return arr


main :: IO ()
main = do
    [n, m] <- map (fst . fromJust . BS.readInt) . BS.words <$> BS.getLine
    arr <- replicateM m (map (fst . fromJust . BS.readInt) . BS.words <$> BS.getLine)
    let ans = solve n arr
    forM_ ans print

