"use strict"
function Main(input) {
  input = input.trim().split('\n');
  const N = input[0].trim().split(' ').map(Number)[0];
  const M = input[0].trim().split(' ').map(Number)[1];
  const AB = input.slice(-M);
  const T = Array(N).fill(0);

  for(let i=0; i<M; i++){
    let A = AB[i].trim().split(' ').map(Number)[0];
    let B = AB[i].trim().split(' ').map(Number)[1];
    T[A-1] = T[A-1] + 1;
    T[B-1] = T[B-1] + 1;
  }
  console.log(T.join('\n'));
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));