import java.util.Arrays;
import java.util.Scanner;

public class Main
{
    public  static  void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int total = sc.nextInt();
        int arr[] = new int[total];
        arr[0]= 0 ;

        for(int i=1;i<total;i++)
        {
            arr[i] = sc.nextInt();
        }
        int temp =0;
        //Arrays.sort(arr);
        int arrNew[] = new int[total];
        for(int i =1;i<total;i++)
        {
            arrNew[arr[i]-1] = arrNew[arr[i]-1]+1;
        }

        for(int i=0;i<total;i++)
        {
            System.out.println(arrNew[i]);
        }




    }
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main
{
    public  static  void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int total = sc.nextInt();
        int arr[] = new int[total];
        arr[0]= 0 ;

        for(int i=1;i<total;i++)
        {
            arr[i] = sc.nextInt();
        }
        int temp =0;
        //Arrays.sort(arr);
        int arrNew[] = new int[total];
        for(int i =1;i<total;i++)
        {
            arrNew[arr[i]-1] = arrNew[arr[i]-1]+1;
        }

        for(int i=0;i<total;i++)
        {
            System.out.println(arrNew[i]);
        }




    }
} Main public  static  void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int total = sc.nextInt();
        int arr[] = new int[total];
        arr[0]= 0 ;

        for(int i=1;i<total;i++)
        {
            arr[i] = sc.nextInt();
        }
        int temp =0;
        //Arrays.sort(arr);
        int arrNew[] = new int[total];
        for(int i =1;i<total;i++)
        {
            arrNew[arr[i]-1] = arrNew[arr[i]-1]+1;
        }

        for(int i=0;i<total;i++)
        {
            System.out.println(arrNew[i]);
        }




    } main {
        Scanner sc = new Scanner(System.in);
        int total = sc.nextInt();
        int arr[] = new int[total];
        arr[0]= 0 ;

        for(int i=1;i<total;i++)
        {
            arr[i] = sc.nextInt();
        }
        int temp =0;
        //Arrays.sort(arr);
        int arrNew[] = new int[total];
        for(int i =1;i<total;i++)
        {
            arrNew[arr[i]-1] = arrNew[arr[i]-1]+1;
        }

        for(int i=0;i<total;i++)
        {
            System.out.println(arrNew[i]);
        }




    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int total = sc.nextInt(); total sc.nextInt() sc.nextInt sc int arr[] = new int[total]; arr new int[total] total arr[0]= 0 arr[0] arr 0 0 for(int i=1;i<total;i++)
        {
            arr[i] = sc.nextInt();
        } int i=1; int i=1; i 1 i<total i total i++ i++ i {
            arr[i] = sc.nextInt();
        } {
            arr[i] = sc.nextInt();
        } arr[i] = sc.nextInt() arr[i] arr i sc.nextInt() sc.nextInt sc int temp =0; temp 0 int arrNew[] = new int[total]; arrNew new int[total] total for(int i =1;i<total;i++)
        {
            arrNew[arr[i]-1] = arrNew[arr[i]-1]+1;
        } int i =1; int i =1; i 1 i<total i total i++ i++ i {
            arrNew[arr[i]-1] = arrNew[arr[i]-1]+1;
        } {
            arrNew[arr[i]-1] = arrNew[arr[i]-1]+1;
        } arrNew[arr[i]-1] = arrNew[arr[i]-1]+1 arrNew[arr[i]-1] arrNew arr[i]-1 arr[i] arr i 1 arrNew[arr[i]-1]+1 arrNew[arr[i]-1] arrNew arr[i]-1 arr[i] arr i 1 1 for(int i=0;i<total;i++)
        {
            System.out.println(arrNew[i]);
        } int i=0; int i=0; i 0 i<total i total i++ i++ i {
            System.out.println(arrNew[i]);
        } {
            System.out.println(arrNew[i]);
        } System.out.println(arrNew[i]) System.out.println System.out System System.out arrNew[i] arrNew i String[] args args public class Main
{
    public  static  void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int total = sc.nextInt();
        int arr[] = new int[total];
        arr[0]= 0 ;

        for(int i=1;i<total;i++)
        {
            arr[i] = sc.nextInt();
        }
        int temp =0;
        //Arrays.sort(arr);
        int arrNew[] = new int[total];
        for(int i =1;i<total;i++)
        {
            arrNew[arr[i]-1] = arrNew[arr[i]-1]+1;
        }

        for(int i=0;i<total;i++)
        {
            System.out.println(arrNew[i]);
        }




    }
} public class Main
{
    public  static  void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int total = sc.nextInt();
        int arr[] = new int[total];
        arr[0]= 0 ;

        for(int i=1;i<total;i++)
        {
            arr[i] = sc.nextInt();
        }
        int temp =0;
        //Arrays.sort(arr);
        int arrNew[] = new int[total];
        for(int i =1;i<total;i++)
        {
            arrNew[arr[i]-1] = arrNew[arr[i]-1]+1;
        }

        for(int i=0;i<total;i++)
        {
            System.out.println(arrNew[i]);
        }




    }
} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main
{
    public  static  void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int total = sc.nextInt();
        int arr[] = new int[total];
        arr[0]= 0 ;

        for(int i=1;i<total;i++)
        {
            arr[i] = sc.nextInt();
        }
        int temp =0;
        //Arrays.sort(arr);
        int arrNew[] = new int[total];
        for(int i =1;i<total;i++)
        {
            arrNew[arr[i]-1] = arrNew[arr[i]-1]+1;
        }

        for(int i=0;i<total;i++)
        {
            System.out.println(arrNew[i]);
        }




    }
}
