function Main(input) {
  var inputs = input.split("\n");
  var n_m = inputs[0].split(" ").map(e => parseInt(e, 10));
  var town = [];
  for (var i = 0; i < n_m[0]; i++) {
    town.push(0);
  }
  var roads;
  for (var i = 1; i <= n_m[1]; i++) {
    roads = inputs[i].split(" ").map(e => parseInt(e, 10));
    town[roads[0] - 1]++;
    town[roads[1] - 1]++;
  }
  for (i of town) {
    console.log(i);
  }
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));