
import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);

    int N = sc.nextInt();
    int A[] = new int[N+1];//上司マップ
    int B[] = new int[N+1];//部下の数配列
    A[0]=0;
    A[1]=0;
    B[0]=0;
    for(int i=2;i<=N;i++){
      A[i]=sc.nextInt();
      B[A[i]]++;
    }
    for(int i=1;i<=N;i++){
      System.out.println(B[i]);
    }



  }
}
  import java.util.*; util.* java public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);

    int N = sc.nextInt();
    int A[] = new int[N+1];//上司マップ
    int B[] = new int[N+1];//部下の数配列
    A[0]=0;
    A[1]=0;
    B[0]=0;
    for(int i=2;i<=N;i++){
      A[i]=sc.nextInt();
      B[A[i]]++;
    }
    for(int i=1;i<=N;i++){
      System.out.println(B[i]);
    }



  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);

    int N = sc.nextInt();
    int A[] = new int[N+1];//上司マップ
    int B[] = new int[N+1];//部下の数配列
    A[0]=0;
    A[1]=0;
    B[0]=0;
    for(int i=2;i<=N;i++){
      A[i]=sc.nextInt();
      B[A[i]]++;
    }
    for(int i=1;i<=N;i++){
      System.out.println(B[i]);
    }



  } main {
    Scanner sc = new Scanner(System.in);

    int N = sc.nextInt();
    int A[] = new int[N+1];//上司マップ
    int B[] = new int[N+1];//部下の数配列
    A[0]=0;
    A[1]=0;
    B[0]=0;
    for(int i=2;i<=N;i++){
      A[i]=sc.nextInt();
      B[A[i]]++;
    }
    for(int i=1;i<=N;i++){
      System.out.println(B[i]);
    }



  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int A[] = new int[N+1]; A new int[N+1] N+1 N 1 int B[] = new int[N+1]; B new int[N+1] N+1 N 1 A[0]=0 A[0] A 0 0 A[1]=0 A[1] A 1 0 B[0]=0 B[0] B 0 0 for(int i=2;i<=N;i++){
      A[i]=sc.nextInt();
      B[A[i]]++;
    } int i=2; int i=2; i 2 i<=N i N i++ i++ i {
      A[i]=sc.nextInt();
      B[A[i]]++;
    } {
      A[i]=sc.nextInt();
      B[A[i]]++;
    } A[i]=sc.nextInt() A[i] A i sc.nextInt() sc.nextInt sc B[A[i]]++ B[A[i]] B A[i] A i for(int i=1;i<=N;i++){
      System.out.println(B[i]);
    } int i=1; int i=1; i 1 i<=N i N i++ i++ i {
      System.out.println(B[i]);
    } {
      System.out.println(B[i]);
    } System.out.println(B[i]) System.out.println System.out System System.out B[i] B i String[] args args public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);

    int N = sc.nextInt();
    int A[] = new int[N+1];//上司マップ
    int B[] = new int[N+1];//部下の数配列
    A[0]=0;
    A[1]=0;
    B[0]=0;
    for(int i=2;i<=N;i++){
      A[i]=sc.nextInt();
      B[A[i]]++;
    }
    for(int i=1;i<=N;i++){
      System.out.println(B[i]);
    }



  }
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);

    int N = sc.nextInt();
    int A[] = new int[N+1];//上司マップ
    int B[] = new int[N+1];//部下の数配列
    A[0]=0;
    A[1]=0;
    B[0]=0;
    for(int i=2;i<=N;i++){
      A[i]=sc.nextInt();
      B[A[i]]++;
    }
    for(int i=1;i<=N;i++){
      System.out.println(B[i]);
    }



  }
} Main

import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);

    int N = sc.nextInt();
    int A[] = new int[N+1];//上司マップ
    int B[] = new int[N+1];//部下の数配列
    A[0]=0;
    A[1]=0;
    B[0]=0;
    for(int i=2;i<=N;i++){
      A[i]=sc.nextInt();
      B[A[i]]++;
    }
    for(int i=1;i<=N;i++){
      System.out.println(B[i]);
    }



  }
}
 