import java.util.Scanner;


public class Main {


	//final int MOD = 1000000007;


	public static void main(String[] args) {

//		long ans = 0;
		Scanner sc = new Scanner(System.in);
		boolean f = false;

		int n = sc.nextInt();
//		int m = sc.nextInt();

		int[] a = new int[n];
		int[] ans = new int[n];
		for (int i = 0; i < n-1; i++) {
			a[i]= sc.nextInt();
			ans[i] = 0;
		}
		ans[n-1] = 0;

		//-------------------------------------------------------------------------------------

		for(int i = 0; i < n; i++) {
			if(a[i] != 0)
				ans[a[i]-1]++;
		}

		//-------------------------------------------------------------------------------------

		for(int i = 0; i < n; i++) {
			System.out.println(ans[i]);
		}

//		if(f) {
//			System.out.println("Yes");
//		} else {
//			System.out.println("No");
//		}

		//System.out.println(ans);

		sc.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {


	//final int MOD = 1000000007;


	public static void main(String[] args) {

//		long ans = 0;
		Scanner sc = new Scanner(System.in);
		boolean f = false;

		int n = sc.nextInt();
//		int m = sc.nextInt();

		int[] a = new int[n];
		int[] ans = new int[n];
		for (int i = 0; i < n-1; i++) {
			a[i]= sc.nextInt();
			ans[i] = 0;
		}
		ans[n-1] = 0;

		//-------------------------------------------------------------------------------------

		for(int i = 0; i < n; i++) {
			if(a[i] != 0)
				ans[a[i]-1]++;
		}

		//-------------------------------------------------------------------------------------

		for(int i = 0; i < n; i++) {
			System.out.println(ans[i]);
		}

//		if(f) {
//			System.out.println("Yes");
//		} else {
//			System.out.println("No");
//		}

		//System.out.println(ans);

		sc.close();
	}
} Main public static void main(String[] args) {

//		long ans = 0;
		Scanner sc = new Scanner(System.in);
		boolean f = false;

		int n = sc.nextInt();
//		int m = sc.nextInt();

		int[] a = new int[n];
		int[] ans = new int[n];
		for (int i = 0; i < n-1; i++) {
			a[i]= sc.nextInt();
			ans[i] = 0;
		}
		ans[n-1] = 0;

		//-------------------------------------------------------------------------------------

		for(int i = 0; i < n; i++) {
			if(a[i] != 0)
				ans[a[i]-1]++;
		}

		//-------------------------------------------------------------------------------------

		for(int i = 0; i < n; i++) {
			System.out.println(ans[i]);
		}

//		if(f) {
//			System.out.println("Yes");
//		} else {
//			System.out.println("No");
//		}

		//System.out.println(ans);

		sc.close();
	} main {

//		long ans = 0;
		Scanner sc = new Scanner(System.in);
		boolean f = false;

		int n = sc.nextInt();
//		int m = sc.nextInt();

		int[] a = new int[n];
		int[] ans = new int[n];
		for (int i = 0; i < n-1; i++) {
			a[i]= sc.nextInt();
			ans[i] = 0;
		}
		ans[n-1] = 0;

		//-------------------------------------------------------------------------------------

		for(int i = 0; i < n; i++) {
			if(a[i] != 0)
				ans[a[i]-1]++;
		}

		//-------------------------------------------------------------------------------------

		for(int i = 0; i < n; i++) {
			System.out.println(ans[i]);
		}

//		if(f) {
//			System.out.println("Yes");
//		} else {
//			System.out.println("No");
//		}

		//System.out.println(ans);

		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) boolean f = false; f false int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int[] a = new int[n]; a new int[n] n int[] ans = new int[n]; ans new int[n] n for (int i = 0; i < n-1; i++) {
			a[i]= sc.nextInt();
			ans[i] = 0;
		} int i = 0; int i = 0; i 0 i < n-1 i n-1 n 1 i++ i++ i {
			a[i]= sc.nextInt();
			ans[i] = 0;
		} {
			a[i]= sc.nextInt();
			ans[i] = 0;
		} a[i]= sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc ans[i] = 0 ans[i] ans i 0 ans[n-1] = 0 ans[n-1] ans n-1 n 1 0 for(int i = 0; i < n; i++) {
			if(a[i] != 0)
				ans[a[i]-1]++;
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			if(a[i] != 0)
				ans[a[i]-1]++;
		} {
			if(a[i] != 0)
				ans[a[i]-1]++;
		} if(a[i] != 0)
				ans[a[i]-1]++; a[i] != 0 a[i] a i 0 ans[a[i]-1]++ ans[a[i]-1] ans a[i]-1 a[i] a i 1 for(int i = 0; i < n; i++) {
			System.out.println(ans[i]);
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			System.out.println(ans[i]);
		} {
			System.out.println(ans[i]);
		} System.out.println(ans[i]) System.out.println System.out System System.out ans[i] ans i sc.close() sc.close sc String[] args args public class Main {


	//final int MOD = 1000000007;


	public static void main(String[] args) {

//		long ans = 0;
		Scanner sc = new Scanner(System.in);
		boolean f = false;

		int n = sc.nextInt();
//		int m = sc.nextInt();

		int[] a = new int[n];
		int[] ans = new int[n];
		for (int i = 0; i < n-1; i++) {
			a[i]= sc.nextInt();
			ans[i] = 0;
		}
		ans[n-1] = 0;

		//-------------------------------------------------------------------------------------

		for(int i = 0; i < n; i++) {
			if(a[i] != 0)
				ans[a[i]-1]++;
		}

		//-------------------------------------------------------------------------------------

		for(int i = 0; i < n; i++) {
			System.out.println(ans[i]);
		}

//		if(f) {
//			System.out.println("Yes");
//		} else {
//			System.out.println("No");
//		}

		//System.out.println(ans);

		sc.close();
	}
} public class Main {


	//final int MOD = 1000000007;


	public static void main(String[] args) {

//		long ans = 0;
		Scanner sc = new Scanner(System.in);
		boolean f = false;

		int n = sc.nextInt();
//		int m = sc.nextInt();

		int[] a = new int[n];
		int[] ans = new int[n];
		for (int i = 0; i < n-1; i++) {
			a[i]= sc.nextInt();
			ans[i] = 0;
		}
		ans[n-1] = 0;

		//-------------------------------------------------------------------------------------

		for(int i = 0; i < n; i++) {
			if(a[i] != 0)
				ans[a[i]-1]++;
		}

		//-------------------------------------------------------------------------------------

		for(int i = 0; i < n; i++) {
			System.out.println(ans[i]);
		}

//		if(f) {
//			System.out.println("Yes");
//		} else {
//			System.out.println("No");
//		}

		//System.out.println(ans);

		sc.close();
	}
} Main
import java.util.Scanner;


public class Main {


	//final int MOD = 1000000007;


	public static void main(String[] args) {

//		long ans = 0;
		Scanner sc = new Scanner(System.in);
		boolean f = false;

		int n = sc.nextInt();
//		int m = sc.nextInt();

		int[] a = new int[n];
		int[] ans = new int[n];
		for (int i = 0; i < n-1; i++) {
			a[i]= sc.nextInt();
			ans[i] = 0;
		}
		ans[n-1] = 0;

		//-------------------------------------------------------------------------------------

		for(int i = 0; i < n; i++) {
			if(a[i] != 0)
				ans[a[i]-1]++;
		}

		//-------------------------------------------------------------------------------------

		for(int i = 0; i < n; i++) {
			System.out.println(ans[i]);
		}

//		if(f) {
//			System.out.println("Yes");
//		} else {
//			System.out.println("No");
//		}

		//System.out.println(ans);

		sc.close();
	}
}