import java.util.*;
import java.math.*;
import java.io.*;

public class Main{
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int[] arr= new int[n];
		for(int qq=1; qq<n; qq++){
			arr[qq] = in.nextInt();
		}
		HashMap<Integer, Integer> mp = new HashMap<>();
		for(int i=0; i<n; i++){
			mp.put(arr[i]-1, 1+mp.getOrDefault(arr[i]-1, 0));
		}
		for(int i=0; i<n; i++){
			System.out.println(mp.getOrDefault(i, 0));
		}
	}
} import java.util.*; util.* java import java.math.*; math.* java import java.io.*; io.* java public class Main{
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int[] arr= new int[n];
		for(int qq=1; qq<n; qq++){
			arr[qq] = in.nextInt();
		}
		HashMap<Integer, Integer> mp = new HashMap<>();
		for(int i=0; i<n; i++){
			mp.put(arr[i]-1, 1+mp.getOrDefault(arr[i]-1, 0));
		}
		for(int i=0; i<n; i++){
			System.out.println(mp.getOrDefault(i, 0));
		}
	}
} Main public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int[] arr= new int[n];
		for(int qq=1; qq<n; qq++){
			arr[qq] = in.nextInt();
		}
		HashMap<Integer, Integer> mp = new HashMap<>();
		for(int i=0; i<n; i++){
			mp.put(arr[i]-1, 1+mp.getOrDefault(arr[i]-1, 0));
		}
		for(int i=0; i<n; i++){
			System.out.println(mp.getOrDefault(i, 0));
		}
	} main {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int[] arr= new int[n];
		for(int qq=1; qq<n; qq++){
			arr[qq] = in.nextInt();
		}
		HashMap<Integer, Integer> mp = new HashMap<>();
		for(int i=0; i<n; i++){
			mp.put(arr[i]-1, 1+mp.getOrDefault(arr[i]-1, 0));
		}
		for(int i=0; i<n; i++){
			System.out.println(mp.getOrDefault(i, 0));
		}
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) int n = in.nextInt(); n in.nextInt() in.nextInt in int[] arr= new int[n]; arr new int[n] n for(int qq=1; qq<n; qq++){
			arr[qq] = in.nextInt();
		} int qq=1; int qq=1; qq 1 qq<n qq n qq++ qq++ qq {
			arr[qq] = in.nextInt();
		} {
			arr[qq] = in.nextInt();
		} arr[qq] = in.nextInt() arr[qq] arr qq in.nextInt() in.nextInt in HashMap<Integer, Integer> mp = new HashMap<>(); mp new HashMap<>() for(int i=0; i<n; i++){
			mp.put(arr[i]-1, 1+mp.getOrDefault(arr[i]-1, 0));
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			mp.put(arr[i]-1, 1+mp.getOrDefault(arr[i]-1, 0));
		} {
			mp.put(arr[i]-1, 1+mp.getOrDefault(arr[i]-1, 0));
		} mp.put(arr[i]-1, 1+mp.getOrDefault(arr[i]-1, 0)) mp.put mp arr[i]-1 arr[i] arr i 1 1+mp.getOrDefault(arr[i]-1, 0) 1 mp.getOrDefault(arr[i]-1, 0) mp.getOrDefault mp arr[i]-1 arr[i] arr i 1 0 for(int i=0; i<n; i++){
			System.out.println(mp.getOrDefault(i, 0));
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			System.out.println(mp.getOrDefault(i, 0));
		} {
			System.out.println(mp.getOrDefault(i, 0));
		} System.out.println(mp.getOrDefault(i, 0)) System.out.println System.out System System.out mp.getOrDefault(i, 0) mp.getOrDefault mp i 0 String[] args args public class Main{
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int[] arr= new int[n];
		for(int qq=1; qq<n; qq++){
			arr[qq] = in.nextInt();
		}
		HashMap<Integer, Integer> mp = new HashMap<>();
		for(int i=0; i<n; i++){
			mp.put(arr[i]-1, 1+mp.getOrDefault(arr[i]-1, 0));
		}
		for(int i=0; i<n; i++){
			System.out.println(mp.getOrDefault(i, 0));
		}
	}
} public class Main{
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int[] arr= new int[n];
		for(int qq=1; qq<n; qq++){
			arr[qq] = in.nextInt();
		}
		HashMap<Integer, Integer> mp = new HashMap<>();
		for(int i=0; i<n; i++){
			mp.put(arr[i]-1, 1+mp.getOrDefault(arr[i]-1, 0));
		}
		for(int i=0; i<n; i++){
			System.out.println(mp.getOrDefault(i, 0));
		}
	}
} Main
import java.util.*;
import java.math.*;
import java.io.*;

public class Main{
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int[] arr= new int[n];
		for(int qq=1; qq<n; qq++){
			arr[qq] = in.nextInt();
		}
		HashMap<Integer, Integer> mp = new HashMap<>();
		for(int i=0; i<n; i++){
			mp.put(arr[i]-1, 1+mp.getOrDefault(arr[i]-1, 0));
		}
		for(int i=0; i<n; i++){
			System.out.println(mp.getOrDefault(i, 0));
		}
	}
}