import java.util.Scanner;

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

            int[] counts = new int[N];
            for (int i = 1; i < N; i++) {
                counts[A[i]]++;
            }

            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < N; i++) {
                sb.append(counts[i]).append("\n");
            }
            System.out.println(sb.toString());

        }
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            int N = sc.nextInt();
            int[] A = new int[N];
            A[0] = 1;
            for (int i = 1; i < N; i++) {
                A[i] = sc.nextInt() - 1;
            }

            int[] counts = new int[N];
            for (int i = 1; i < N; i++) {
                counts[A[i]]++;
            }

            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < N; i++) {
                sb.append(counts[i]).append("\n");
            }
            System.out.println(sb.toString());

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

            int[] counts = new int[N];
            for (int i = 1; i < N; i++) {
                counts[A[i]]++;
            }

            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < N; i++) {
                sb.append(counts[i]).append("\n");
            }
            System.out.println(sb.toString());

        }
    } main {
        try (Scanner sc = new Scanner(System.in)) {
            int N = sc.nextInt();
            int[] A = new int[N];
            A[0] = 1;
            for (int i = 1; i < N; i++) {
                A[i] = sc.nextInt() - 1;
            }

            int[] counts = new int[N];
            for (int i = 1; i < N; i++) {
                counts[A[i]]++;
            }

            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < N; i++) {
                sb.append(counts[i]).append("\n");
            }
            System.out.println(sb.toString());

        }
    } try (Scanner sc = new Scanner(System.in)) {
            int N = sc.nextInt();
            int[] A = new int[N];
            A[0] = 1;
            for (int i = 1; i < N; i++) {
                A[i] = sc.nextInt() - 1;
            }

            int[] counts = new int[N];
            for (int i = 1; i < N; i++) {
                counts[A[i]]++;
            }

            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < N; i++) {
                sb.append(counts[i]).append("\n");
            }
            System.out.println(sb.toString());

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

            int[] counts = new int[N];
            for (int i = 1; i < N; i++) {
                counts[A[i]]++;
            }

            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < N; i++) {
                sb.append(counts[i]).append("\n");
            }
            System.out.println(sb.toString());

        } Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int[] A = new int[N]; A new int[N] N A[0] = 1 A[0] A 0 1 for (int i = 1; i < N; i++) {
                A[i] = sc.nextInt() - 1;
            } int i = 1; int i = 1; i 1 i < N i N i++ i++ i {
                A[i] = sc.nextInt() - 1;
            } {
                A[i] = sc.nextInt() - 1;
            } A[i] = sc.nextInt() - 1 A[i] A i sc.nextInt() - 1 sc.nextInt() sc.nextInt sc 1 int[] counts = new int[N]; counts new int[N] N for (int i = 1; i < N; i++) {
                counts[A[i]]++;
            } int i = 1; int i = 1; i 1 i < N i N i++ i++ i {
                counts[A[i]]++;
            } {
                counts[A[i]]++;
            } counts[A[i]]++ counts[A[i]] counts A[i] A i StringBuilder sb = new StringBuilder(); sb new StringBuilder() for (int i = 0; i < N; i++) {
                sb.append(counts[i]).append("\n");
            } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
                sb.append(counts[i]).append("\n");
            } {
                sb.append(counts[i]).append("\n");
            } sb.append(counts[i]).append("\n") sb.append(counts[i]).append sb.append(counts[i]) sb.append sb counts[i] counts i "\n" System.out.println(sb.toString()) System.out.println System.out System System.out sb.toString() sb.toString sb String[] args args public class Main {
    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            int N = sc.nextInt();
            int[] A = new int[N];
            A[0] = 1;
            for (int i = 1; i < N; i++) {
                A[i] = sc.nextInt() - 1;
            }

            int[] counts = new int[N];
            for (int i = 1; i < N; i++) {
                counts[A[i]]++;
            }

            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < N; i++) {
                sb.append(counts[i]).append("\n");
            }
            System.out.println(sb.toString());

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

            int[] counts = new int[N];
            for (int i = 1; i < N; i++) {
                counts[A[i]]++;
            }

            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < N; i++) {
                sb.append(counts[i]).append("\n");
            }
            System.out.println(sb.toString());

        }
    }
} Main
import java.util.Scanner;

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

            int[] counts = new int[N];
            for (int i = 1; i < N; i++) {
                counts[A[i]]++;
            }

            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < N; i++) {
                sb.append(counts[i]).append("\n");
            }
            System.out.println(sb.toString());

        }
    }
}
