import Control.Monad
import Data.Array
main = do
  [n,m] <- map read . words <$> getLine
  abs <- replicateM m $ map read . words <$> getLine
  let ar = accumArray (+) 0 (1,n) [(i,1) | ab <- abs, i <- ab]
  mapM_ print $ elems $ ar