import java.io.PrintWriter;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int[] B = new int[N];
        B[N - 2] = 0;

        for (int i = 0; i < N - 1; i++) {
            B[Integer.parseInt(sc.next()) - 1]++;
        }

        PrintWriter out = new PrintWriter(System.out);
        for (int i = 0; i < N; i++) {
            out.println(B[i]);
            out.flush();
        }

        sc.close();
    }
} import java.io.PrintWriter; PrintWriter java.io import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int[] B = new int[N];
        B[N - 2] = 0;

        for (int i = 0; i < N - 1; i++) {
            B[Integer.parseInt(sc.next()) - 1]++;
        }

        PrintWriter out = new PrintWriter(System.out);
        for (int i = 0; i < N; i++) {
            out.println(B[i]);
            out.flush();
        }

        sc.close();
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int[] B = new int[N];
        B[N - 2] = 0;

        for (int i = 0; i < N - 1; i++) {
            B[Integer.parseInt(sc.next()) - 1]++;
        }

        PrintWriter out = new PrintWriter(System.out);
        for (int i = 0; i < N; i++) {
            out.println(B[i]);
            out.flush();
        }

        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int[] B = new int[N];
        B[N - 2] = 0;

        for (int i = 0; i < N - 1; i++) {
            B[Integer.parseInt(sc.next()) - 1]++;
        }

        PrintWriter out = new PrintWriter(System.out);
        for (int i = 0; i < N; i++) {
            out.println(B[i]);
            out.flush();
        }

        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = Integer.parseInt(sc.next()); N Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int[] B = new int[N]; B new int[N] N B[N - 2] = 0 B[N - 2] B N - 2 N 2 0 for (int i = 0; i < N - 1; i++) {
            B[Integer.parseInt(sc.next()) - 1]++;
        } int i = 0; int i = 0; i 0 i < N - 1 i N - 1 N 1 i++ i++ i {
            B[Integer.parseInt(sc.next()) - 1]++;
        } {
            B[Integer.parseInt(sc.next()) - 1]++;
        } B[Integer.parseInt(sc.next()) - 1]++ B[Integer.parseInt(sc.next()) - 1] B Integer.parseInt(sc.next()) - 1 Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc 1 PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) for (int i = 0; i < N; i++) {
            out.println(B[i]);
            out.flush();
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            out.println(B[i]);
            out.flush();
        } {
            out.println(B[i]);
            out.flush();
        } out.println(B[i]) out.println out B[i] B i out.flush() out.flush out sc.close() sc.close sc String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int[] B = new int[N];
        B[N - 2] = 0;

        for (int i = 0; i < N - 1; i++) {
            B[Integer.parseInt(sc.next()) - 1]++;
        }

        PrintWriter out = new PrintWriter(System.out);
        for (int i = 0; i < N; i++) {
            out.println(B[i]);
            out.flush();
        }

        sc.close();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int[] B = new int[N];
        B[N - 2] = 0;

        for (int i = 0; i < N - 1; i++) {
            B[Integer.parseInt(sc.next()) - 1]++;
        }

        PrintWriter out = new PrintWriter(System.out);
        for (int i = 0; i < N; i++) {
            out.println(B[i]);
            out.flush();
        }

        sc.close();
    }
} Main
import java.io.PrintWriter;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int[] B = new int[N];
        B[N - 2] = 0;

        for (int i = 0; i < N - 1; i++) {
            B[Integer.parseInt(sc.next()) - 1]++;
        }

        PrintWriter out = new PrintWriter(System.out);
        for (int i = 0; i < N; i++) {
            out.println(B[i]);
            out.flush();
        }

        sc.close();
    }
}