import Data.Array.IO
import Control.Applicative
import Control.Monad

main = do
  (n:m:_) <- (map read) . words <$> getLine
  dat <- (map ((map read) . words)) . lines <$> getContents
  arr <- newArray (1,n) 0 :: IO (IOArray Int Int)

  forM_ dat $ \(a:b:_) -> do
    incr arr a
    incr arr b
  
  mapM_ print =<< getElems arr

  where
    incr arr n = do
      r <- readArray arr n
      writeArray arr n (r+1)
