import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[] As = new int[N];
        int[] Bossz = new int [N];
        for (int n = 1; n < N; n++) {
            As[n] = sc.nextInt();
        }

        for (int n = 1; n < N; n++) {
//            System.out.println(" "+n+" "+As[n]);
            Bossz[As[n] - 1]++;
        }

        for (int n = 0; n < N; n++) {
//            System.out.println(" "+n+" "+As[n]+" "+Bossz[n]);
            System.out.println(Bossz[n]);
        }
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[] As = new int[N];
        int[] Bossz = new int [N];
        for (int n = 1; n < N; n++) {
            As[n] = sc.nextInt();
        }

        for (int n = 1; n < N; n++) {
//            System.out.println(" "+n+" "+As[n]);
            Bossz[As[n] - 1]++;
        }

        for (int n = 0; n < N; n++) {
//            System.out.println(" "+n+" "+As[n]+" "+Bossz[n]);
            System.out.println(Bossz[n]);
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[] As = new int[N];
        int[] Bossz = new int [N];
        for (int n = 1; n < N; n++) {
            As[n] = sc.nextInt();
        }

        for (int n = 1; n < N; n++) {
//            System.out.println(" "+n+" "+As[n]);
            Bossz[As[n] - 1]++;
        }

        for (int n = 0; n < N; n++) {
//            System.out.println(" "+n+" "+As[n]+" "+Bossz[n]);
            System.out.println(Bossz[n]);
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[] As = new int[N];
        int[] Bossz = new int [N];
        for (int n = 1; n < N; n++) {
            As[n] = sc.nextInt();
        }

        for (int n = 1; n < N; n++) {
//            System.out.println(" "+n+" "+As[n]);
            Bossz[As[n] - 1]++;
        }

        for (int n = 0; n < N; n++) {
//            System.out.println(" "+n+" "+As[n]+" "+Bossz[n]);
            System.out.println(Bossz[n]);
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int[] As = new int[N]; As new int[N] N int[] Bossz = new int [N]; Bossz new int [N] N for (int n = 1; n < N; n++) {
            As[n] = sc.nextInt();
        } int n = 1; int n = 1; n 1 n < N n N n++ n++ n {
            As[n] = sc.nextInt();
        } {
            As[n] = sc.nextInt();
        } As[n] = sc.nextInt() As[n] As n sc.nextInt() sc.nextInt sc for (int n = 1; n < N; n++) {
//            System.out.println(" "+n+" "+As[n]);
            Bossz[As[n] - 1]++;
        } int n = 1; int n = 1; n 1 n < N n N n++ n++ n {
//            System.out.println(" "+n+" "+As[n]);
            Bossz[As[n] - 1]++;
        } {
//            System.out.println(" "+n+" "+As[n]);
            Bossz[As[n] - 1]++;
        } Bossz[As[n] - 1]++ Bossz[As[n] - 1] Bossz As[n] - 1 As[n] As n 1 for (int n = 0; n < N; n++) {
//            System.out.println(" "+n+" "+As[n]+" "+Bossz[n]);
            System.out.println(Bossz[n]);
        } int n = 0; int n = 0; n 0 n < N n N n++ n++ n {
//            System.out.println(" "+n+" "+As[n]+" "+Bossz[n]);
            System.out.println(Bossz[n]);
        } {
//            System.out.println(" "+n+" "+As[n]+" "+Bossz[n]);
            System.out.println(Bossz[n]);
        } System.out.println(Bossz[n]) System.out.println System.out System System.out Bossz[n] Bossz n String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[] As = new int[N];
        int[] Bossz = new int [N];
        for (int n = 1; n < N; n++) {
            As[n] = sc.nextInt();
        }

        for (int n = 1; n < N; n++) {
//            System.out.println(" "+n+" "+As[n]);
            Bossz[As[n] - 1]++;
        }

        for (int n = 0; n < N; n++) {
//            System.out.println(" "+n+" "+As[n]+" "+Bossz[n]);
            System.out.println(Bossz[n]);
        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[] As = new int[N];
        int[] Bossz = new int [N];
        for (int n = 1; n < N; n++) {
            As[n] = sc.nextInt();
        }

        for (int n = 1; n < N; n++) {
//            System.out.println(" "+n+" "+As[n]);
            Bossz[As[n] - 1]++;
        }

        for (int n = 0; n < N; n++) {
//            System.out.println(" "+n+" "+As[n]+" "+Bossz[n]);
            System.out.println(Bossz[n]);
        }
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[] As = new int[N];
        int[] Bossz = new int [N];
        for (int n = 1; n < N; n++) {
            As[n] = sc.nextInt();
        }

        for (int n = 1; n < N; n++) {
//            System.out.println(" "+n+" "+As[n]);
            Bossz[As[n] - 1]++;
        }

        for (int n = 0; n < N; n++) {
//            System.out.println(" "+n+" "+As[n]+" "+Bossz[n]);
            System.out.println(Bossz[n]);
        }
    }
}