import java.util.*; 
import java.lang.*; 

public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		
		int N = scan.nextInt();
                int[] A = new int[N+1];
                int[] cnt = new int[N+1];
                A[1]=0;
                for(int i=2; i<=N; i++){
                    A[i] = scan.nextInt();
                            cnt[A[i]]++;
                }
                
                for(int i=1; i<=N; i++){
                    System.out.println(cnt[i]);
                }
	}
} import java.util.*; util.* java import java.lang.*; lang.* java public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		
		int N = scan.nextInt();
                int[] A = new int[N+1];
                int[] cnt = new int[N+1];
                A[1]=0;
                for(int i=2; i<=N; i++){
                    A[i] = scan.nextInt();
                            cnt[A[i]]++;
                }
                
                for(int i=1; i<=N; i++){
                    System.out.println(cnt[i]);
                }
	}
} Main public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		
		int N = scan.nextInt();
                int[] A = new int[N+1];
                int[] cnt = new int[N+1];
                A[1]=0;
                for(int i=2; i<=N; i++){
                    A[i] = scan.nextInt();
                            cnt[A[i]]++;
                }
                
                for(int i=1; i<=N; i++){
                    System.out.println(cnt[i]);
                }
	} main {
		Scanner scan = new Scanner(System.in);
		
		int N = scan.nextInt();
                int[] A = new int[N+1];
                int[] cnt = new int[N+1];
                A[1]=0;
                for(int i=2; i<=N; i++){
                    A[i] = scan.nextInt();
                            cnt[A[i]]++;
                }
                
                for(int i=1; i<=N; i++){
                    System.out.println(cnt[i]);
                }
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan int[] A = new int[N+1]; A new int[N+1] N+1 N 1 int[] cnt = new int[N+1]; cnt new int[N+1] N+1 N 1 A[1]=0 A[1] A 1 0 for(int i=2; i<=N; i++){
                    A[i] = scan.nextInt();
                            cnt[A[i]]++;
                } int i=2; int i=2; i 2 i<=N i N i++ i++ i {
                    A[i] = scan.nextInt();
                            cnt[A[i]]++;
                } {
                    A[i] = scan.nextInt();
                            cnt[A[i]]++;
                } A[i] = scan.nextInt() A[i] A i scan.nextInt() scan.nextInt scan cnt[A[i]]++ cnt[A[i]] cnt A[i] A i for(int i=1; i<=N; i++){
                    System.out.println(cnt[i]);
                } int i=1; int i=1; i 1 i<=N i N i++ i++ i {
                    System.out.println(cnt[i]);
                } {
                    System.out.println(cnt[i]);
                } System.out.println(cnt[i]) System.out.println System.out System System.out cnt[i] cnt i String[] args args public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		
		int N = scan.nextInt();
                int[] A = new int[N+1];
                int[] cnt = new int[N+1];
                A[1]=0;
                for(int i=2; i<=N; i++){
                    A[i] = scan.nextInt();
                            cnt[A[i]]++;
                }
                
                for(int i=1; i<=N; i++){
                    System.out.println(cnt[i]);
                }
	}
} public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		
		int N = scan.nextInt();
                int[] A = new int[N+1];
                int[] cnt = new int[N+1];
                A[1]=0;
                for(int i=2; i<=N; i++){
                    A[i] = scan.nextInt();
                            cnt[A[i]]++;
                }
                
                for(int i=1; i<=N; i++){
                    System.out.println(cnt[i]);
                }
	}
} Main
import java.util.*; 
import java.lang.*; 

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