import Data.List (sort, group)
import Control.Arrow ((&&&))

type City = Int
type Road = (Int, Int)

main :: IO ()
main = do
    [n, m] <- map toInt . words <$> getLine :: IO [Int]
    roads  <- getRoads [1..m]  :: IO [Road]
    mapM_ print $ enumerateCitySRoad [1..n] $ groupRoads roads

enumerateCitySRoad :: [City] -> [(City, Int)] -> [Int]
enumerateCitySRoad [] _      = []
enumerateCitySRoad (c:cs) xs = length (filter (\x -> fst x == c) xs) : enumerateCitySRoad cs xs

groupRoads :: [Road] -> [(City, Int)]
groupRoads directedLines =
  howManyRoads . group . sort $ bothDirectionLines
  where
  swapStartEndPoint (a, b) = (b, a)
  inverse = map swapStartEndPoint :: [Road] -> [Road]
  bothDirectionLines = directedLines ++ inverse directedLines :: [Road]
  howManyRoads = map (fst . head &&& length) :: [[Road]] -> [Road]

toInt :: String -> Int 
toInt = read

getRoads :: [Int] -> IO [Road]
getRoads = mapM $ \_ -> do 
                    [x,y] <- map toInt . words <$> getLine
                    return (x, y)