import Control.Monad
import Control.Applicative
import Data.List
import qualified Data.Map as Map
import Data.Array
import qualified Data.ByteString.Char8 as BC
import Data.Maybe
import qualified Data.Set as Set
import qualified Data.Sequence as Sq
import Data.Sequence (ViewL(..),ViewR(..),(><),(<|),(|>),Seq)

bsreadInt :: BC.ByteString -> Int
bsreadInt = fst . fromJust . BC.readInt
strToInt s = (read :: String -> Int) s

ccount :: [[Int]] -> Int -> Int
ccount xs i = length $ filter (elem i) xs

main = do
    [n,m] <- (map read . words) <$> getLine
    ab <- replicateM m (map strToInt . words <$> getLine)
    let ans = [ccount ab i |i <- [1..n] ]
    mapM_ print ans