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());
        // String s = sc.next();
        int[] a = new int[n+1];
        int[] b = new int[n+1];

        for (int i = 2; i <= n; i++) {
            a[i] = Integer.parseInt(sc.next());
            b[a[i]]++;
        }
        for (int i = 1; i <= n; i++) {
            System.out.println(b[i]);
        }
        // System.out.println();
        sc.close();
    }

} 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());
        // String s = sc.next();
        int[] a = new int[n+1];
        int[] b = new int[n+1];

        for (int i = 2; i <= n; i++) {
            a[i] = Integer.parseInt(sc.next());
            b[a[i]]++;
        }
        for (int i = 1; i <= n; i++) {
            System.out.println(b[i]);
        }
        // System.out.println();
        sc.close();
    }

} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        // String s = sc.next();
        int[] a = new int[n+1];
        int[] b = new int[n+1];

        for (int i = 2; i <= n; i++) {
            a[i] = Integer.parseInt(sc.next());
            b[a[i]]++;
        }
        for (int i = 1; i <= n; i++) {
            System.out.println(b[i]);
        }
        // System.out.println();
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        // String s = sc.next();
        int[] a = new int[n+1];
        int[] b = new int[n+1];

        for (int i = 2; i <= n; i++) {
            a[i] = Integer.parseInt(sc.next());
            b[a[i]]++;
        }
        for (int i = 1; i <= n; i++) {
            System.out.println(b[i]);
        }
        // System.out.println();
        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[] a = new int[n+1]; a new int[n+1] n+1 n 1 int[] b = new int[n+1]; b new int[n+1] n+1 n 1 for (int i = 2; i <= n; i++) {
            a[i] = Integer.parseInt(sc.next());
            b[a[i]]++;
        } int i = 2; int i = 2; i 2 i <= n i n i++ i++ i {
            a[i] = Integer.parseInt(sc.next());
            b[a[i]]++;
        } {
            a[i] = Integer.parseInt(sc.next());
            b[a[i]]++;
        } a[i] = Integer.parseInt(sc.next()) a[i] a i Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc b[a[i]]++ b[a[i]] b a[i] a i for (int i = 1; i <= n; i++) {
            System.out.println(b[i]);
        } int i = 1; int i = 1; i 1 i <= n i n 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 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());
        // String s = sc.next();
        int[] a = new int[n+1];
        int[] b = new int[n+1];

        for (int i = 2; i <= n; i++) {
            a[i] = Integer.parseInt(sc.next());
            b[a[i]]++;
        }
        for (int i = 1; i <= n; i++) {
            System.out.println(b[i]);
        }
        // System.out.println();
        sc.close();
    }

} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        // String s = sc.next();
        int[] a = new int[n+1];
        int[] b = new int[n+1];

        for (int i = 2; i <= n; i++) {
            a[i] = Integer.parseInt(sc.next());
            b[a[i]]++;
        }
        for (int i = 1; i <= n; i++) {
            System.out.println(b[i]);
        }
        // System.out.println();
        sc.close();
    }

} Main
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());
        // String s = sc.next();
        int[] a = new int[n+1];
        int[] b = new int[n+1];

        for (int i = 2; i <= n; i++) {
            a[i] = Integer.parseInt(sc.next());
            b[a[i]]++;
        }
        for (int i = 1; i <= n; i++) {
            System.out.println(b[i]);
        }
        // System.out.println();
        sc.close();
    }

}