import java.util.Scanner;

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
       
        // 配列
        int[] a = new int[n+1];
        for(int i=2;i<=n;i++){
            a[i] += sc.nextInt();
        }
        
        int[] cnt =  new int[n+1];
        for(int i=2;i<=n;i++){
            cnt[a[i]]++;
        }

        for(int i=1;i<=n;i++){
            System.out.println(cnt[i]);
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
       
        // 配列
        int[] a = new int[n+1];
        for(int i=2;i<=n;i++){
            a[i] += sc.nextInt();
        }
        
        int[] cnt =  new int[n+1];
        for(int i=2;i<=n;i++){
            cnt[a[i]]++;
        }

        for(int i=1;i<=n;i++){
            System.out.println(cnt[i]);
        }
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
       
        // 配列
        int[] a = new int[n+1];
        for(int i=2;i<=n;i++){
            a[i] += sc.nextInt();
        }
        
        int[] cnt =  new int[n+1];
        for(int i=2;i<=n;i++){
            cnt[a[i]]++;
        }

        for(int i=1;i<=n;i++){
            System.out.println(cnt[i]);
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
       
        // 配列
        int[] a = new int[n+1];
        for(int i=2;i<=n;i++){
            a[i] += sc.nextInt();
        }
        
        int[] cnt =  new int[n+1];
        for(int i=2;i<=n;i++){
            cnt[a[i]]++;
        }

        for(int i=1;i<=n;i++){
            System.out.println(cnt[i]);
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int[] a = new int[n+1]; a new int[n+1] n+1 n 1 for(int i=2;i<=n;i++){
            a[i] += sc.nextInt();
        } int i=2; int i=2; i 2 i<=n i n i++ i++ i {
            a[i] += sc.nextInt();
        } {
            a[i] += sc.nextInt();
        } a[i] += sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc int[] cnt =  new int[n+1]; cnt new int[n+1] n+1 n 1 for(int i=2;i<=n;i++){
            cnt[a[i]]++;
        } int i=2; int i=2; i 2 i<=n i n i++ i++ i {
            cnt[a[i]]++;
        } {
            cnt[a[i]]++;
        } cnt[a[i]]++ cnt[a[i]] cnt a[i] a i for(int i=1;i<=n;i++){
            System.out.println(cnt[i]);
        } int i=1; int i=1; i 1 i<=n i n i++ i++ i {
            System.out.println(cnt[i]);
        } {
            System.out.println(cnt[i]);
        } System.out.println(cnt[i]) System.out.println System.out System System.out cnt[i] cnt i String[] args args public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
       
        // 配列
        int[] a = new int[n+1];
        for(int i=2;i<=n;i++){
            a[i] += sc.nextInt();
        }
        
        int[] cnt =  new int[n+1];
        for(int i=2;i<=n;i++){
            cnt[a[i]]++;
        }

        for(int i=1;i<=n;i++){
            System.out.println(cnt[i]);
        }
    }
} public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
       
        // 配列
        int[] a = new int[n+1];
        for(int i=2;i<=n;i++){
            a[i] += sc.nextInt();
        }
        
        int[] cnt =  new int[n+1];
        for(int i=2;i<=n;i++){
            cnt[a[i]]++;
        }

        for(int i=1;i<=n;i++){
            System.out.println(cnt[i]);
        }
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
       
        // 配列
        int[] a = new int[n+1];
        for(int i=2;i<=n;i++){
            a[i] += sc.nextInt();
        }
        
        int[] cnt =  new int[n+1];
        for(int i=2;i<=n;i++){
            cnt[a[i]]++;
        }

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