import Control.Monad
import Data.List
import qualified Data.IntMap as M

main=do
    [n,m]<-map read.words<$>getLine::IO[Int]
    abs<-replicateM m $ map read.words<$>getLine::IO[[Int]]
    mapM_ (print.snd) $ M.toAscList $ foldl (\m [a,b] -> M.insertWith(+)a 1 $ M.insertWith(+)b 1 m) (M.fromList $ zip [1..n] $ repeat 0) abs
