import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		int N = scan.nextInt();
		int A = 0;
		int[] B = new int[N+1];
		for (int i = 2; i < N+1; i++) {
			A = scan.nextInt();
			B[A]++;
		}

		for (int i = 1; i < N+1; i++) {
			System.out.println(B[i]);
		}

	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		int N = scan.nextInt();
		int A = 0;
		int[] B = new int[N+1];
		for (int i = 2; i < N+1; i++) {
			A = scan.nextInt();
			B[A]++;
		}

		for (int i = 1; i < N+1; i++) {
			System.out.println(B[i]);
		}

	}

} Main public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		int N = scan.nextInt();
		int A = 0;
		int[] B = new int[N+1];
		for (int i = 2; i < N+1; i++) {
			A = scan.nextInt();
			B[A]++;
		}

		for (int i = 1; i < N+1; i++) {
			System.out.println(B[i]);
		}

	} main {

		Scanner scan = new Scanner(System.in);

		int N = scan.nextInt();
		int A = 0;
		int[] B = new int[N+1];
		for (int i = 2; i < N+1; i++) {
			A = scan.nextInt();
			B[A]++;
		}

		for (int i = 1; i < N+1; i++) {
			System.out.println(B[i]);
		}

	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan int A = 0; A 0 int[] B = new int[N+1]; B new int[N+1] N+1 N 1 for (int i = 2; i < N+1; i++) {
			A = scan.nextInt();
			B[A]++;
		} int i = 2; int i = 2; i 2 i < N+1 i N+1 N 1 i++ i++ i {
			A = scan.nextInt();
			B[A]++;
		} {
			A = scan.nextInt();
			B[A]++;
		} A = scan.nextInt() A scan.nextInt() scan.nextInt scan B[A]++ B[A] B A for (int i = 1; i < N+1; i++) {
			System.out.println(B[i]);
		} int i = 1; int i = 1; i 1 i < N+1 i N+1 N 1 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 scan = new Scanner(System.in);

		int N = scan.nextInt();
		int A = 0;
		int[] B = new int[N+1];
		for (int i = 2; i < N+1; i++) {
			A = scan.nextInt();
			B[A]++;
		}

		for (int i = 1; i < N+1; i++) {
			System.out.println(B[i]);
		}

	}

} public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		int N = scan.nextInt();
		int A = 0;
		int[] B = new int[N+1];
		for (int i = 2; i < N+1; i++) {
			A = scan.nextInt();
			B[A]++;
		}

		for (int i = 1; i < N+1; i++) {
			System.out.println(B[i]);
		}

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		int N = scan.nextInt();
		int A = 0;
		int[] B = new int[N+1];
		for (int i = 2; i < N+1; i++) {
			A = scan.nextInt();
			B[A]++;
		}

		for (int i = 1; i < N+1; i++) {
			System.out.println(B[i]);
		}

	}

}