fun main(args:Array<String>){
    val n = readLine()!!.toInt()
    val line = readLine()!!.split(" ").map { it.toInt() }
    val list = Array<Int>(n){it*0}
    for(i in 0..n-2){
        list.set(line[i]-1,list.get(line[i]-1)+1)
    }
    list.map { println(it) }
}