import           Control.Monad
import           Control.Applicative

main :: IO ()
main = do
  [n, m] <- map read . words <$> getLine
  rs     <- replicateM m $ map read . words <$> getLine

  forM_ (ans n rs) $ \i -> print i
  where ans n rs = map (\i -> length (filter (== i) (concat rs))) [1 .. n]