function Main(input){
  var arr = input.split('\n');
  var NM = arr.shift().split(' ');
  var N = Number(NM[0]);
  var M = Number(NM[1]);
  arr.pop();
  arr.sort();

  // var a = new Array(Number(arr[arr.length-1].split(' ')[0])).fill(0);
  var a = [];
  for(var i=0;i<arr.length;i++){
    if(isNaN(a[Number(arr[i].split(' ')[1])-1])){
      a[Number(arr[i].split(' ')[1])-1]=0;
    }
    if(isNaN(a[Number(arr[i].split(' ')[0])-1])){
      a[Number(arr[i].split(' ')[0])-1]=0;
    }
    ++a[Number(arr[i].split(' ')[0])-1];
    ++a[Number(arr[i].split(' ')[1])-1];
  }
  for(var i of a){
    console.log(i);
  }
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));