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

typedef unsigned long long int ull;
typedef long long int ll;
typedef long double ld;

int main(void) {
  int scan; // scanf result
  int *answer; // to output 
  int n; // to input 
  int *bosses;
  int boss;

  scan = scanf("%d", &n);
  bosses = (int *)malloc(sizeof(int) * n);
  answer = (int *)malloc(sizeof(int) * n);

  bosses[1] = 0;
  for (int i = 2; i <= n; i++) {
    scan = scanf("%d", &bosses[i]);
  }

  for (int i = 1; i <= n; i++) {
    boss = bosses[i];
    answer[boss] += 1;
  }

  for (int k = 1; k <= n; k++) {
    printf("%d\n", answer[k]);
  } 
  return (0);
}
