function Main(input){
    input = input.replace(/\n/g,' ').split(' ');

    var n = input.shift();
    var m = input.shift();

    var counts = {};
    for(var i = 0;i < input.length;i++) {
        var key = input[i];
        if(counts[key]) {
            counts[key] = counts[key] + 1;
        } else {
            counts[key] = 1;
        }
    }
    for(var g = 1;g <= Object.keys(counts).length; g++){
        console.log(counts[g])
    }
  }
Main(require("fs").readFileSync("/dev/stdin", "utf8"));