module Main where
import Data.Function
import qualified Data.Map as M
import Data.Maybe
import Control.Monad
main = do
  n:m:_ <- map read . words <$> getLine :: IO [Int]
  ls <- flip fix (M.empty, m) $ \loop (loads,cnt) -> 
    if cnt == 0 then return loads
    else do
    a:b:_ <- map read . words <$> getLine :: IO [Int]    
    let na = fromMaybe 0 $ M.lookup a loads 
    let nb = fromMaybe 0 $ M.lookup b loads
    let loads' = M.insert a (na + 1) $ M.insert b (nb + 1) $ loads
    loop (loads', cnt - 1)
  forM_ [1..n] $ \i -> do
    print $ fromMaybe 0 $ M.lookup i ls
  return ()
