import Control.Monad
import Data.Array.IO

main :: IO ()
main = do
  [n, m] <- (map read . words) <$> getLine :: IO [Int]
  counts <- newArray (0, m) 0 :: IO (IOArray Int Int)
  replicateM_ m $ do
    [a, b] <- (map read . words) <$> getLine :: IO [Int]
    writeArray counts (a - 1) =<< (+ 1) <$> readArray counts (a - 1)
    writeArray counts (b - 1) =<< (+ 1) <$> readArray counts (b - 1)

  forM_ [0..n-1] $ \i -> readArray counts i >>= print
