import java.util.*;
 
public class Main {
 
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner s = new Scanner(System.in);
      int n=s.nextInt();
      int []a=new int[200010];
        int []ar=new int[200010];
      for(int i=2;i<=n;i++)
      {
        a[i]=s.nextInt();
      }
      for(int i=2;i<=n;i++)
      {
        ar[a[i]]++;
      }
       for(int i=1;i<=n;i++)
       {
         System.out.println(ar[i]);
       }
    }
} import java.util.*; util.* java public class Main {
 
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner s = new Scanner(System.in);
      int n=s.nextInt();
      int []a=new int[200010];
        int []ar=new int[200010];
      for(int i=2;i<=n;i++)
      {
        a[i]=s.nextInt();
      }
      for(int i=2;i<=n;i++)
      {
        ar[a[i]]++;
      }
       for(int i=1;i<=n;i++)
       {
         System.out.println(ar[i]);
       }
    }
} Main public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner s = new Scanner(System.in);
      int n=s.nextInt();
      int []a=new int[200010];
        int []ar=new int[200010];
      for(int i=2;i<=n;i++)
      {
        a[i]=s.nextInt();
      }
      for(int i=2;i<=n;i++)
      {
        ar[a[i]]++;
      }
       for(int i=1;i<=n;i++)
       {
         System.out.println(ar[i]);
       }
    } main {
		// TODO Auto-generated method stub
		Scanner s = new Scanner(System.in);
      int n=s.nextInt();
      int []a=new int[200010];
        int []ar=new int[200010];
      for(int i=2;i<=n;i++)
      {
        a[i]=s.nextInt();
      }
      for(int i=2;i<=n;i++)
      {
        ar[a[i]]++;
      }
       for(int i=1;i<=n;i++)
       {
         System.out.println(ar[i]);
       }
    } Scanner s = new Scanner(System.in); s new Scanner(System.in) int n=s.nextInt(); n s.nextInt() s.nextInt s int []a=new int[200010]; a new int[200010] 200010 int []ar=new int[200010]; ar new int[200010] 200010 for(int i=2;i<=n;i++)
      {
        a[i]=s.nextInt();
      } int i=2; int i=2; i 2 i<=n i n i++ i++ i {
        a[i]=s.nextInt();
      } {
        a[i]=s.nextInt();
      } a[i]=s.nextInt() a[i] a i s.nextInt() s.nextInt s for(int i=2;i<=n;i++)
      {
        ar[a[i]]++;
      } int i=2; int i=2; i 2 i<=n i n i++ i++ i {
        ar[a[i]]++;
      } {
        ar[a[i]]++;
      } ar[a[i]]++ ar[a[i]] ar a[i] a i for(int i=1;i<=n;i++)
       {
         System.out.println(ar[i]);
       } int i=1; int i=1; i 1 i<=n i n i++ i++ i {
         System.out.println(ar[i]);
       } {
         System.out.println(ar[i]);
       } System.out.println(ar[i]) System.out.println System.out System System.out ar[i] ar i String[] args args public class Main {
 
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner s = new Scanner(System.in);
      int n=s.nextInt();
      int []a=new int[200010];
        int []ar=new int[200010];
      for(int i=2;i<=n;i++)
      {
        a[i]=s.nextInt();
      }
      for(int i=2;i<=n;i++)
      {
        ar[a[i]]++;
      }
       for(int i=1;i<=n;i++)
       {
         System.out.println(ar[i]);
       }
    }
} public class Main {
 
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner s = new Scanner(System.in);
      int n=s.nextInt();
      int []a=new int[200010];
        int []ar=new int[200010];
      for(int i=2;i<=n;i++)
      {
        a[i]=s.nextInt();
      }
      for(int i=2;i<=n;i++)
      {
        ar[a[i]]++;
      }
       for(int i=1;i<=n;i++)
       {
         System.out.println(ar[i]);
       }
    }
} Main
import java.util.*;
 
public class Main {
 
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner s = new Scanner(System.in);
      int n=s.nextInt();
      int []a=new int[200010];
        int []ar=new int[200010];
      for(int i=2;i<=n;i++)
      {
        a[i]=s.nextInt();
      }
      for(int i=2;i<=n;i++)
      {
        ar[a[i]]++;
      }
       for(int i=1;i<=n;i++)
       {
         System.out.println(ar[i]);
       }
    }
}
