import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] nums = new int[n + 1];
		for (int i = 1; i < n; i++) {
			int next = scan.nextInt();
			nums[next] = ++nums[next];
		}
		for (int j = 0; j < n; j++) {
			System.out.println(nums[j + 1]);
		}

		scan.close();
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] nums = new int[n + 1];
		for (int i = 1; i < n; i++) {
			int next = scan.nextInt();
			nums[next] = ++nums[next];
		}
		for (int j = 0; j < n; j++) {
			System.out.println(nums[j + 1]);
		}

		scan.close();
	}

} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] nums = new int[n + 1];
		for (int i = 1; i < n; i++) {
			int next = scan.nextInt();
			nums[next] = ++nums[next];
		}
		for (int j = 0; j < n; j++) {
			System.out.println(nums[j + 1]);
		}

		scan.close();
	} main {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] nums = new int[n + 1];
		for (int i = 1; i < n; i++) {
			int next = scan.nextInt();
			nums[next] = ++nums[next];
		}
		for (int j = 0; j < n; j++) {
			System.out.println(nums[j + 1]);
		}

		scan.close();
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int[] nums = new int[n + 1]; nums new int[n + 1] n + 1 n 1 for (int i = 1; i < n; i++) {
			int next = scan.nextInt();
			nums[next] = ++nums[next];
		} int i = 1; int i = 1; i 1 i < n i n i++ i++ i {
			int next = scan.nextInt();
			nums[next] = ++nums[next];
		} {
			int next = scan.nextInt();
			nums[next] = ++nums[next];
		} int next = scan.nextInt(); next scan.nextInt() scan.nextInt scan nums[next] = ++nums[next] nums[next] nums next ++nums[next] nums[next] nums next for (int j = 0; j < n; j++) {
			System.out.println(nums[j + 1]);
		} int j = 0; int j = 0; j 0 j < n j n j++ j++ j {
			System.out.println(nums[j + 1]);
		} {
			System.out.println(nums[j + 1]);
		} System.out.println(nums[j + 1]) System.out.println System.out System System.out nums[j + 1] nums j + 1 j 1 scan.close() scan.close scan String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] nums = new int[n + 1];
		for (int i = 1; i < n; i++) {
			int next = scan.nextInt();
			nums[next] = ++nums[next];
		}
		for (int j = 0; j < n; j++) {
			System.out.println(nums[j + 1]);
		}

		scan.close();
	}

} public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] nums = new int[n + 1];
		for (int i = 1; i < n; i++) {
			int next = scan.nextInt();
			nums[next] = ++nums[next];
		}
		for (int j = 0; j < n; j++) {
			System.out.println(nums[j + 1]);
		}

		scan.close();
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] nums = new int[n + 1];
		for (int i = 1; i < n; i++) {
			int next = scan.nextInt();
			nums[next] = ++nums[next];
		}
		for (int j = 0; j < n; j++) {
			System.out.println(nums[j + 1]);
		}

		scan.close();
	}

}
