#include <stdio.h>
#include <stdlib.h>
  
int main(void){
int N=0;
scanf("%d",N);
int A[N];
int B[N];
for (int i=0;i<N;i++){
  A[i]=0;
  B[i]=0;
}
for (int i=1;i<N;i++){
  scanf("%d",&A[i]);
  if (A[i]>0)
  B[A[i]-1] = B[A[i]-1] + 1;
}
for (int i=0;i<N;i++){
  printf("%d",B[A[i]]);
}
return 0;
}