#include<stdio.h>
#include<stdlib.h>
#include<string.h>

int main(void){
    int i,j,n,count;
    int a[200010];
    a[0] = 0;
    a[1] = 0;
    scanf("%d",&n);

    for(i = 2;i<=n;i++){
        scanf("%d",&a[i]);
    }
    for(i=1;i<=n;i++){
        count = 0;
        for(j = i+1;j<=n;j++){
            if(a[j] == i){
                count++;
            }
        }
        printf("%d\n",count);
    }
    return 0;
}