open System

let [| N; M |] = stdin.ReadLine().Split(' ') |> Array.map int
let (cnt : int[]) = Array.zeroCreate N
for i in {0..(M - 1)} do
  let [| a; b |] = stdin.ReadLine().Split(' ') |> Array.map int
  cnt.[a - 1] <- cnt.[a - 1] + 1
  cnt.[b - 1] <- cnt.[b - 1] + 1

cnt
|> Array.iter (printfn "%d")