import java.util.*;

public class Main
{
	public static void main (String[] args) 
	{
		
		Scanner scn = new Scanner(System.in);
    Map<Integer,Integer> map = new HashMap<Integer,Integer>();
    int n = scn.nextInt();
    int []arr = new int[n];
    for(int i=1;i<n;i++){
      arr[i] = scn.nextInt();
    }
    for(int i=1;i<arr.length;i++){
      if(map.containsKey(arr[i])){
        int val = map.get(arr[i]) + 1;
        map.put(arr[i],val);
      }else{
        map.put(arr[i],1);
      } 
 }
 
  for(int i=1;i<arr.length;i++){
  	if(map.containsKey(i)){
    int val = map.get(i);
    System.out.println(val);
  	}
    else
    System.out.println(0);
    
  }
      System.out.println(0);
		
		
	}
} import java.util.*; util.* java public class Main
{
	public static void main (String[] args) 
	{
		
		Scanner scn = new Scanner(System.in);
    Map<Integer,Integer> map = new HashMap<Integer,Integer>();
    int n = scn.nextInt();
    int []arr = new int[n];
    for(int i=1;i<n;i++){
      arr[i] = scn.nextInt();
    }
    for(int i=1;i<arr.length;i++){
      if(map.containsKey(arr[i])){
        int val = map.get(arr[i]) + 1;
        map.put(arr[i],val);
      }else{
        map.put(arr[i],1);
      } 
 }
 
  for(int i=1;i<arr.length;i++){
  	if(map.containsKey(i)){
    int val = map.get(i);
    System.out.println(val);
  	}
    else
    System.out.println(0);
    
  }
      System.out.println(0);
		
		
	}
} Main public static void main (String[] args) 
	{
		
		Scanner scn = new Scanner(System.in);
    Map<Integer,Integer> map = new HashMap<Integer,Integer>();
    int n = scn.nextInt();
    int []arr = new int[n];
    for(int i=1;i<n;i++){
      arr[i] = scn.nextInt();
    }
    for(int i=1;i<arr.length;i++){
      if(map.containsKey(arr[i])){
        int val = map.get(arr[i]) + 1;
        map.put(arr[i],val);
      }else{
        map.put(arr[i],1);
      } 
 }
 
  for(int i=1;i<arr.length;i++){
  	if(map.containsKey(i)){
    int val = map.get(i);
    System.out.println(val);
  	}
    else
    System.out.println(0);
    
  }
      System.out.println(0);
		
		
	} main {
		
		Scanner scn = new Scanner(System.in);
    Map<Integer,Integer> map = new HashMap<Integer,Integer>();
    int n = scn.nextInt();
    int []arr = new int[n];
    for(int i=1;i<n;i++){
      arr[i] = scn.nextInt();
    }
    for(int i=1;i<arr.length;i++){
      if(map.containsKey(arr[i])){
        int val = map.get(arr[i]) + 1;
        map.put(arr[i],val);
      }else{
        map.put(arr[i],1);
      } 
 }
 
  for(int i=1;i<arr.length;i++){
  	if(map.containsKey(i)){
    int val = map.get(i);
    System.out.println(val);
  	}
    else
    System.out.println(0);
    
  }
      System.out.println(0);
		
		
	} Scanner scn = new Scanner(System.in); scn new Scanner(System.in) Map<Integer,Integer> map = new HashMap<Integer,Integer>(); map new HashMap<Integer,Integer>() int n = scn.nextInt(); n scn.nextInt() scn.nextInt scn int []arr = new int[n]; arr new int[n] n for(int i=1;i<n;i++){
      arr[i] = scn.nextInt();
    } int i=1; int i=1; i 1 i<n i n i++ i++ i {
      arr[i] = scn.nextInt();
    } {
      arr[i] = scn.nextInt();
    } arr[i] = scn.nextInt() arr[i] arr i scn.nextInt() scn.nextInt scn for(int i=1;i<arr.length;i++){
      if(map.containsKey(arr[i])){
        int val = map.get(arr[i]) + 1;
        map.put(arr[i],val);
      }else{
        map.put(arr[i],1);
      } 
 } int i=1; int i=1; i 1 i<arr.length i arr.length arr arr.length i++ i++ i {
      if(map.containsKey(arr[i])){
        int val = map.get(arr[i]) + 1;
        map.put(arr[i],val);
      }else{
        map.put(arr[i],1);
      } 
 } {
      if(map.containsKey(arr[i])){
        int val = map.get(arr[i]) + 1;
        map.put(arr[i],val);
      }else{
        map.put(arr[i],1);
      } 
 } if(map.containsKey(arr[i])){
        int val = map.get(arr[i]) + 1;
        map.put(arr[i],val);
      }else{
        map.put(arr[i],1);
      } map.containsKey(arr[i]) map.containsKey map arr[i] arr i {
        int val = map.get(arr[i]) + 1;
        map.put(arr[i],val);
      } int val = map.get(arr[i]) + 1; val map.get(arr[i]) + 1 map.get(arr[i]) map.get map arr[i] arr i 1 map.put(arr[i],val) map.put map arr[i] arr i val {
        map.put(arr[i],1);
      } map.put(arr[i],1) map.put map arr[i] arr i 1 for(int i=1;i<arr.length;i++){
  	if(map.containsKey(i)){
    int val = map.get(i);
    System.out.println(val);
  	}
    else
    System.out.println(0);
    
  } int i=1; int i=1; i 1 i<arr.length i arr.length arr arr.length i++ i++ i {
  	if(map.containsKey(i)){
    int val = map.get(i);
    System.out.println(val);
  	}
    else
    System.out.println(0);
    
  } {
  	if(map.containsKey(i)){
    int val = map.get(i);
    System.out.println(val);
  	}
    else
    System.out.println(0);
    
  } if(map.containsKey(i)){
    int val = map.get(i);
    System.out.println(val);
  	}
    else
    System.out.println(0); map.containsKey(i) map.containsKey map i {
    int val = map.get(i);
    System.out.println(val);
  	} int val = map.get(i); val map.get(i) map.get map i System.out.println(val) System.out.println System.out System System.out val System.out.println(0) System.out.println System.out System System.out 0 System.out.println(0) System.out.println System.out System System.out 0 String[] args args public class Main
{
	public static void main (String[] args) 
	{
		
		Scanner scn = new Scanner(System.in);
    Map<Integer,Integer> map = new HashMap<Integer,Integer>();
    int n = scn.nextInt();
    int []arr = new int[n];
    for(int i=1;i<n;i++){
      arr[i] = scn.nextInt();
    }
    for(int i=1;i<arr.length;i++){
      if(map.containsKey(arr[i])){
        int val = map.get(arr[i]) + 1;
        map.put(arr[i],val);
      }else{
        map.put(arr[i],1);
      } 
 }
 
  for(int i=1;i<arr.length;i++){
  	if(map.containsKey(i)){
    int val = map.get(i);
    System.out.println(val);
  	}
    else
    System.out.println(0);
    
  }
      System.out.println(0);
		
		
	}
} public class Main
{
	public static void main (String[] args) 
	{
		
		Scanner scn = new Scanner(System.in);
    Map<Integer,Integer> map = new HashMap<Integer,Integer>();
    int n = scn.nextInt();
    int []arr = new int[n];
    for(int i=1;i<n;i++){
      arr[i] = scn.nextInt();
    }
    for(int i=1;i<arr.length;i++){
      if(map.containsKey(arr[i])){
        int val = map.get(arr[i]) + 1;
        map.put(arr[i],val);
      }else{
        map.put(arr[i],1);
      } 
 }
 
  for(int i=1;i<arr.length;i++){
  	if(map.containsKey(i)){
    int val = map.get(i);
    System.out.println(val);
  	}
    else
    System.out.println(0);
    
  }
      System.out.println(0);
		
		
	}
} Main
import java.util.*;

public class Main
{
	public static void main (String[] args) 
	{
		
		Scanner scn = new Scanner(System.in);
    Map<Integer,Integer> map = new HashMap<Integer,Integer>();
    int n = scn.nextInt();
    int []arr = new int[n];
    for(int i=1;i<n;i++){
      arr[i] = scn.nextInt();
    }
    for(int i=1;i<arr.length;i++){
      if(map.containsKey(arr[i])){
        int val = map.get(arr[i]) + 1;
        map.put(arr[i],val);
      }else{
        map.put(arr[i],1);
      } 
 }
 
  for(int i=1;i<arr.length;i++){
  	if(map.containsKey(i)){
    int val = map.get(i);
    System.out.println(val);
  	}
    else
    System.out.println(0);
    
  }
      System.out.println(0);
		
		
	}
}