import java.util.Scanner;

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

} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] joshi = new int[N-1];
		int[] buka_cnt = new int[N] ;
		for(int i = 0;i<N-1;i++) {
			joshi[i] = sc.nextInt();
		}
		for(int i = N-2;i>=0;i--) {
			buka_cnt[joshi[i]-1]++;
		}
		for(int j :buka_cnt) {
			System.out.println(j);
		}
	}

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

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

} Main
import java.util.Scanner;

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

}