import java.util.Scanner;
import java.util.HashMap;
 
class Main {
	public static void main(String[] args) {
 
	    Scanner sc = new Scanner(System.in);
	    int N = sc.nextInt();
	    HashMap<Integer, Integer> map = new HashMap<>();
	    for (int i = 1; i < N; i++) {
	      int temp = sc.nextInt();
	      Integer count = map.get(temp);
	      if (count == null) { count = 1;} else { count++;}
	      
	      map.put(temp, count);
	    }
	    
	    int ans = 0;
	    for (int j = 1; j <= N; j++) {
	      if (map.get(j) == null) { ans = 0;} else { ans = map.get(j);}
	      System.out.println(ans);
	    }
	  }
} import java.util.Scanner; Scanner java.util import java.util.HashMap; HashMap java.util class Main {
	public static void main(String[] args) {
 
	    Scanner sc = new Scanner(System.in);
	    int N = sc.nextInt();
	    HashMap<Integer, Integer> map = new HashMap<>();
	    for (int i = 1; i < N; i++) {
	      int temp = sc.nextInt();
	      Integer count = map.get(temp);
	      if (count == null) { count = 1;} else { count++;}
	      
	      map.put(temp, count);
	    }
	    
	    int ans = 0;
	    for (int j = 1; j <= N; j++) {
	      if (map.get(j) == null) { ans = 0;} else { ans = map.get(j);}
	      System.out.println(ans);
	    }
	  }
} Main public static void main(String[] args) {
 
	    Scanner sc = new Scanner(System.in);
	    int N = sc.nextInt();
	    HashMap<Integer, Integer> map = new HashMap<>();
	    for (int i = 1; i < N; i++) {
	      int temp = sc.nextInt();
	      Integer count = map.get(temp);
	      if (count == null) { count = 1;} else { count++;}
	      
	      map.put(temp, count);
	    }
	    
	    int ans = 0;
	    for (int j = 1; j <= N; j++) {
	      if (map.get(j) == null) { ans = 0;} else { ans = map.get(j);}
	      System.out.println(ans);
	    }
	  } main {
 
	    Scanner sc = new Scanner(System.in);
	    int N = sc.nextInt();
	    HashMap<Integer, Integer> map = new HashMap<>();
	    for (int i = 1; i < N; i++) {
	      int temp = sc.nextInt();
	      Integer count = map.get(temp);
	      if (count == null) { count = 1;} else { count++;}
	      
	      map.put(temp, count);
	    }
	    
	    int ans = 0;
	    for (int j = 1; j <= N; j++) {
	      if (map.get(j) == null) { ans = 0;} else { ans = map.get(j);}
	      System.out.println(ans);
	    }
	  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc HashMap<Integer, Integer> map = new HashMap<>(); map new HashMap<>() for (int i = 1; i < N; i++) {
	      int temp = sc.nextInt();
	      Integer count = map.get(temp);
	      if (count == null) { count = 1;} else { count++;}
	      
	      map.put(temp, count);
	    } int i = 1; int i = 1; i 1 i < N i N i++ i++ i {
	      int temp = sc.nextInt();
	      Integer count = map.get(temp);
	      if (count == null) { count = 1;} else { count++;}
	      
	      map.put(temp, count);
	    } {
	      int temp = sc.nextInt();
	      Integer count = map.get(temp);
	      if (count == null) { count = 1;} else { count++;}
	      
	      map.put(temp, count);
	    } int temp = sc.nextInt(); temp sc.nextInt() sc.nextInt sc Integer count = map.get(temp); count map.get(temp) map.get map temp if (count == null) { count = 1;} else { count++;} count == null count null { count = 1;} count = 1 count 1 { count++;} count++ count map.put(temp, count) map.put map temp count int ans = 0; ans 0 for (int j = 1; j <= N; j++) {
	      if (map.get(j) == null) { ans = 0;} else { ans = map.get(j);}
	      System.out.println(ans);
	    } int j = 1; int j = 1; j 1 j <= N j N j++ j++ j {
	      if (map.get(j) == null) { ans = 0;} else { ans = map.get(j);}
	      System.out.println(ans);
	    } {
	      if (map.get(j) == null) { ans = 0;} else { ans = map.get(j);}
	      System.out.println(ans);
	    } if (map.get(j) == null) { ans = 0;} else { ans = map.get(j);} map.get(j) == null map.get(j) map.get map j null { ans = 0;} ans = 0 ans 0 { ans = map.get(j);} ans = map.get(j) ans map.get(j) map.get map j System.out.println(ans) System.out.println System.out System System.out ans String[] args args
import java.util.Scanner;
import java.util.HashMap;
 
class Main {
	public static void main(String[] args) {
 
	    Scanner sc = new Scanner(System.in);
	    int N = sc.nextInt();
	    HashMap<Integer, Integer> map = new HashMap<>();
	    for (int i = 1; i < N; i++) {
	      int temp = sc.nextInt();
	      Integer count = map.get(temp);
	      if (count == null) { count = 1;} else { count++;}
	      
	      map.put(temp, count);
	    }
	    
	    int ans = 0;
	    for (int j = 1; j <= N; j++) {
	      if (map.get(j) == null) { ans = 0;} else { ans = map.get(j);}
	      System.out.println(ans);
	    }
	  }
}