

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        //Solution sol = new Solution();
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

        List<Integer> adj[] = new List[n+1];
        for(int i=0; i<=n; i++) {
            adj[i] = new ArrayList();
        }
        for(int i=1; i<n; i++) {
            int boss = sc.nextInt();
            adj[boss].add(i);
        }

        for(int i=1; i<=n; i++) {
            System.out.println(adj[i].size());
        }
    }
}
 import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        //Solution sol = new Solution();
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

        List<Integer> adj[] = new List[n+1];
        for(int i=0; i<=n; i++) {
            adj[i] = new ArrayList();
        }
        for(int i=1; i<n; i++) {
            int boss = sc.nextInt();
            adj[boss].add(i);
        }

        for(int i=1; i<=n; i++) {
            System.out.println(adj[i].size());
        }
    }
} Main public static void main(String[] args) {
        //Solution sol = new Solution();
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

        List<Integer> adj[] = new List[n+1];
        for(int i=0; i<=n; i++) {
            adj[i] = new ArrayList();
        }
        for(int i=1; i<n; i++) {
            int boss = sc.nextInt();
            adj[boss].add(i);
        }

        for(int i=1; i<=n; i++) {
            System.out.println(adj[i].size());
        }
    } main {
        //Solution sol = new Solution();
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

        List<Integer> adj[] = new List[n+1];
        for(int i=0; i<=n; i++) {
            adj[i] = new ArrayList();
        }
        for(int i=1; i<n; i++) {
            int boss = sc.nextInt();
            adj[boss].add(i);
        }

        for(int i=1; i<=n; i++) {
            System.out.println(adj[i].size());
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc List<Integer> adj[] = new List[n+1]; adj new List[n+1] n+1 n 1 for(int i=0; i<=n; i++) {
            adj[i] = new ArrayList();
        } int i=0; int i=0; i 0 i<=n i n i++ i++ i {
            adj[i] = new ArrayList();
        } {
            adj[i] = new ArrayList();
        } adj[i] = new ArrayList() adj[i] adj i new ArrayList() for(int i=1; i<n; i++) {
            int boss = sc.nextInt();
            adj[boss].add(i);
        } int i=1; int i=1; i 1 i<n i n i++ i++ i {
            int boss = sc.nextInt();
            adj[boss].add(i);
        } {
            int boss = sc.nextInt();
            adj[boss].add(i);
        } int boss = sc.nextInt(); boss sc.nextInt() sc.nextInt sc adj[boss].add(i) adj[boss].add adj[boss] adj boss i for(int i=1; i<=n; i++) {
            System.out.println(adj[i].size());
        } int i=1; int i=1; i 1 i<=n i n i++ i++ i {
            System.out.println(adj[i].size());
        } {
            System.out.println(adj[i].size());
        } System.out.println(adj[i].size()) System.out.println System.out System System.out adj[i].size() adj[i].size adj[i] adj i String[] args args public class Main {

    public static void main(String[] args) {
        //Solution sol = new Solution();
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

        List<Integer> adj[] = new List[n+1];
        for(int i=0; i<=n; i++) {
            adj[i] = new ArrayList();
        }
        for(int i=1; i<n; i++) {
            int boss = sc.nextInt();
            adj[boss].add(i);
        }

        for(int i=1; i<=n; i++) {
            System.out.println(adj[i].size());
        }
    }
} public class Main {

    public static void main(String[] args) {
        //Solution sol = new Solution();
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

        List<Integer> adj[] = new List[n+1];
        for(int i=0; i<=n; i++) {
            adj[i] = new ArrayList();
        }
        for(int i=1; i<n; i++) {
            int boss = sc.nextInt();
            adj[boss].add(i);
        }

        for(int i=1; i<=n; i++) {
            System.out.println(adj[i].size());
        }
    }
} Main


import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        //Solution sol = new Solution();
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

        List<Integer> adj[] = new List[n+1];
        for(int i=0; i<=n; i++) {
            adj[i] = new ArrayList();
        }
        for(int i=1; i<n; i++) {
            int boss = sc.nextInt();
            adj[boss].add(i);
        }

        for(int i=1; i<=n; i++) {
            System.out.println(adj[i].size());
        }
    }
}

