#include <stdio.h>

#define rep(i,n) for(int i=0;i<(int)(n);i++)

int main(){
  int i, n, k=-1;
  scanf("%d",&n);
  int a[n],d[n];
  a[0] = 0;
  for(i=1;i<n;i++) scanf("%d",&a[i]);
  rep(i,n) d[i] = 0;
  rep(i,n) d[a[i]]++;
  rep(i,n) {
    if(a[i]!=k) {
      printf("%d\n",d[a[i]+1]);
      k++;
    }
    else puts("0");
  }
}