import java.util.*;

class Main{
  public static void main(String[] args) {
    Scanner reader=new Scanner(System.in);
    int n=reader.nextInt();
    int buka[]=new int[n+1];
    int number[]=new int[n+1];
    buka[0]=0;
    for(int i=0;i<n;i++)
    {
      number[i]=0;
    }
    for(int i=2;i<=n;i++)
    {
      buka[i]=reader.nextInt();

      number[buka[i]]++;

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










  }
} import java.util.*; util.* java class Main{
  public static void main(String[] args) {
    Scanner reader=new Scanner(System.in);
    int n=reader.nextInt();
    int buka[]=new int[n+1];
    int number[]=new int[n+1];
    buka[0]=0;
    for(int i=0;i<n;i++)
    {
      number[i]=0;
    }
    for(int i=2;i<=n;i++)
    {
      buka[i]=reader.nextInt();

      number[buka[i]]++;

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










  }
} Main public static void main(String[] args) {
    Scanner reader=new Scanner(System.in);
    int n=reader.nextInt();
    int buka[]=new int[n+1];
    int number[]=new int[n+1];
    buka[0]=0;
    for(int i=0;i<n;i++)
    {
      number[i]=0;
    }
    for(int i=2;i<=n;i++)
    {
      buka[i]=reader.nextInt();

      number[buka[i]]++;

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










  } main {
    Scanner reader=new Scanner(System.in);
    int n=reader.nextInt();
    int buka[]=new int[n+1];
    int number[]=new int[n+1];
    buka[0]=0;
    for(int i=0;i<n;i++)
    {
      number[i]=0;
    }
    for(int i=2;i<=n;i++)
    {
      buka[i]=reader.nextInt();

      number[buka[i]]++;

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










  } Scanner reader=new Scanner(System.in); reader new Scanner(System.in) int n=reader.nextInt(); n reader.nextInt() reader.nextInt reader int buka[]=new int[n+1]; buka new int[n+1] n+1 n 1 int number[]=new int[n+1]; number new int[n+1] n+1 n 1 buka[0]=0 buka[0] buka 0 0 for(int i=0;i<n;i++)
    {
      number[i]=0;
    } int i=0; int i=0; i 0 i<n i n i++ i++ i {
      number[i]=0;
    } {
      number[i]=0;
    } number[i]=0 number[i] number i 0 for(int i=2;i<=n;i++)
    {
      buka[i]=reader.nextInt();

      number[buka[i]]++;

    } int i=2; int i=2; i 2 i<=n i n i++ i++ i {
      buka[i]=reader.nextInt();

      number[buka[i]]++;

    } {
      buka[i]=reader.nextInt();

      number[buka[i]]++;

    } buka[i]=reader.nextInt() buka[i] buka i reader.nextInt() reader.nextInt reader number[buka[i]]++ number[buka[i]] number buka[i] buka i for(int i=1;i<=n;i++)
  System.out.println(number[i]); int i=1; int i=1; i 1 i<=n i n i++ i++ i System.out.println(number[i]); System.out.println(number[i]) System.out.println System.out System System.out number[i] number i String[] args args
import java.util.*;

class Main{
  public static void main(String[] args) {
    Scanner reader=new Scanner(System.in);
    int n=reader.nextInt();
    int buka[]=new int[n+1];
    int number[]=new int[n+1];
    buka[0]=0;
    for(int i=0;i<n;i++)
    {
      number[i]=0;
    }
    for(int i=2;i<=n;i++)
    {
      buka[i]=reader.nextInt();

      number[buka[i]]++;

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










  }
}