import java.util.Scanner;
public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();
		int[] array = new int[200010];
		int[] count = new int[200010];

		for(int i =2;i<=n;i++) {

			array[i] = scan.nextInt();
		}

		for(int i=2;i<=n;i++) {
			count[array[i]]++;
		}


		for(int i=1;i<=n;i++) {
		System.out.println(count[i]);
		}
		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[] array = new int[200010];
		int[] count = new int[200010];

		for(int i =2;i<=n;i++) {

			array[i] = scan.nextInt();
		}

		for(int i=2;i<=n;i++) {
			count[array[i]]++;
		}


		for(int i=1;i<=n;i++) {
		System.out.println(count[i]);
		}
		scan.close();

	}

} Main public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();
		int[] array = new int[200010];
		int[] count = new int[200010];

		for(int i =2;i<=n;i++) {

			array[i] = scan.nextInt();
		}

		for(int i=2;i<=n;i++) {
			count[array[i]]++;
		}


		for(int i=1;i<=n;i++) {
		System.out.println(count[i]);
		}
		scan.close();

	} main {

		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();
		int[] array = new int[200010];
		int[] count = new int[200010];

		for(int i =2;i<=n;i++) {

			array[i] = scan.nextInt();
		}

		for(int i=2;i<=n;i++) {
			count[array[i]]++;
		}


		for(int i=1;i<=n;i++) {
		System.out.println(count[i]);
		}
		scan.close();

	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int[] array = new int[200010]; array new int[200010] 200010 int[] count = new int[200010]; count new int[200010] 200010 for(int i =2;i<=n;i++) {

			array[i] = scan.nextInt();
		} int i =2; int i =2; i 2 i<=n i n i++ i++ i {

			array[i] = scan.nextInt();
		} {

			array[i] = scan.nextInt();
		} array[i] = scan.nextInt() array[i] array i scan.nextInt() scan.nextInt scan for(int i=2;i<=n;i++) {
			count[array[i]]++;
		} int i=2; int i=2; i 2 i<=n i n i++ i++ i {
			count[array[i]]++;
		} {
			count[array[i]]++;
		} count[array[i]]++ count[array[i]] count array[i] array i for(int i=1;i<=n;i++) {
		System.out.println(count[i]);
		} int i=1; int i=1; i 1 i<=n i n i++ i++ i {
		System.out.println(count[i]);
		} {
		System.out.println(count[i]);
		} System.out.println(count[i]) System.out.println System.out System System.out count[i] count i 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[] array = new int[200010];
		int[] count = new int[200010];

		for(int i =2;i<=n;i++) {

			array[i] = scan.nextInt();
		}

		for(int i=2;i<=n;i++) {
			count[array[i]]++;
		}


		for(int i=1;i<=n;i++) {
		System.out.println(count[i]);
		}
		scan.close();

	}

} public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();
		int[] array = new int[200010];
		int[] count = new int[200010];

		for(int i =2;i<=n;i++) {

			array[i] = scan.nextInt();
		}

		for(int i=2;i<=n;i++) {
			count[array[i]]++;
		}


		for(int i=1;i<=n;i++) {
		System.out.println(count[i]);
		}
		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[] array = new int[200010];
		int[] count = new int[200010];

		for(int i =2;i<=n;i++) {

			array[i] = scan.nextInt();
		}

		for(int i=2;i<=n;i++) {
			count[array[i]]++;
		}


		for(int i=1;i<=n;i++) {
		System.out.println(count[i]);
		}
		scan.close();

	}

}
