import java.util.Scanner;
import java.util.SortedMap;
import java.util.TreeMap;

public class Main {

	static Main instance = new Main();

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		//入力値
		int N = scan.nextInt();
		int[] A = new int[N - 1];

		for (int i = 0; i < N - 1; i++) {
			A[i] = scan.nextInt();
		}

		//WK変数
		SortedMap<Integer, Integer> map = new TreeMap<>();

		for (int i = 0; i < N; i++) {
			map.put(i + 1, 0);
		}

		//演算
		for (int i = 0; i < N - 1; i++) {
			map.put(A[i], map.get(A[i]) + 1);
		}

		//結果出力
		for (int i = 0; i < N; i++) {
			System.out.println(map.get(i + 1));
		}
	}
} import java.util.Scanner; Scanner java.util import java.util.SortedMap; SortedMap java.util import java.util.TreeMap; TreeMap java.util public class Main {

	static Main instance = new Main();

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		//入力値
		int N = scan.nextInt();
		int[] A = new int[N - 1];

		for (int i = 0; i < N - 1; i++) {
			A[i] = scan.nextInt();
		}

		//WK変数
		SortedMap<Integer, Integer> map = new TreeMap<>();

		for (int i = 0; i < N; i++) {
			map.put(i + 1, 0);
		}

		//演算
		for (int i = 0; i < N - 1; i++) {
			map.put(A[i], map.get(A[i]) + 1);
		}

		//結果出力
		for (int i = 0; i < N; i++) {
			System.out.println(map.get(i + 1));
		}
	}
} Main static Main instance = new Main(); instance new Main() public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		//入力値
		int N = scan.nextInt();
		int[] A = new int[N - 1];

		for (int i = 0; i < N - 1; i++) {
			A[i] = scan.nextInt();
		}

		//WK変数
		SortedMap<Integer, Integer> map = new TreeMap<>();

		for (int i = 0; i < N; i++) {
			map.put(i + 1, 0);
		}

		//演算
		for (int i = 0; i < N - 1; i++) {
			map.put(A[i], map.get(A[i]) + 1);
		}

		//結果出力
		for (int i = 0; i < N; i++) {
			System.out.println(map.get(i + 1));
		}
	} main {

		Scanner scan = new Scanner(System.in);

		//入力値
		int N = scan.nextInt();
		int[] A = new int[N - 1];

		for (int i = 0; i < N - 1; i++) {
			A[i] = scan.nextInt();
		}

		//WK変数
		SortedMap<Integer, Integer> map = new TreeMap<>();

		for (int i = 0; i < N; i++) {
			map.put(i + 1, 0);
		}

		//演算
		for (int i = 0; i < N - 1; i++) {
			map.put(A[i], map.get(A[i]) + 1);
		}

		//結果出力
		for (int i = 0; i < N; i++) {
			System.out.println(map.get(i + 1));
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan int[] A = new int[N - 1]; A new int[N - 1] N - 1 N 1 for (int i = 0; i < N - 1; i++) {
			A[i] = scan.nextInt();
		} int i = 0; int i = 0; i 0 i < N - 1 i N - 1 N 1 i++ i++ i {
			A[i] = scan.nextInt();
		} {
			A[i] = scan.nextInt();
		} A[i] = scan.nextInt() A[i] A i scan.nextInt() scan.nextInt scan SortedMap<Integer, Integer> map = new TreeMap<>(); map new TreeMap<>() for (int i = 0; i < N; i++) {
			map.put(i + 1, 0);
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			map.put(i + 1, 0);
		} {
			map.put(i + 1, 0);
		} map.put(i + 1, 0) map.put map i + 1 i 1 0 for (int i = 0; i < N - 1; i++) {
			map.put(A[i], map.get(A[i]) + 1);
		} int i = 0; int i = 0; i 0 i < N - 1 i N - 1 N 1 i++ i++ i {
			map.put(A[i], map.get(A[i]) + 1);
		} {
			map.put(A[i], map.get(A[i]) + 1);
		} map.put(A[i], map.get(A[i]) + 1) map.put map A[i] A i map.get(A[i]) + 1 map.get(A[i]) map.get map A[i] A i 1 for (int i = 0; i < N; i++) {
			System.out.println(map.get(i + 1));
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			System.out.println(map.get(i + 1));
		} {
			System.out.println(map.get(i + 1));
		} System.out.println(map.get(i + 1)) System.out.println System.out System System.out map.get(i + 1) map.get map i + 1 i 1 String[] args args public class Main {

	static Main instance = new Main();

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		//入力値
		int N = scan.nextInt();
		int[] A = new int[N - 1];

		for (int i = 0; i < N - 1; i++) {
			A[i] = scan.nextInt();
		}

		//WK変数
		SortedMap<Integer, Integer> map = new TreeMap<>();

		for (int i = 0; i < N; i++) {
			map.put(i + 1, 0);
		}

		//演算
		for (int i = 0; i < N - 1; i++) {
			map.put(A[i], map.get(A[i]) + 1);
		}

		//結果出力
		for (int i = 0; i < N; i++) {
			System.out.println(map.get(i + 1));
		}
	}
} public class Main {

	static Main instance = new Main();

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		//入力値
		int N = scan.nextInt();
		int[] A = new int[N - 1];

		for (int i = 0; i < N - 1; i++) {
			A[i] = scan.nextInt();
		}

		//WK変数
		SortedMap<Integer, Integer> map = new TreeMap<>();

		for (int i = 0; i < N; i++) {
			map.put(i + 1, 0);
		}

		//演算
		for (int i = 0; i < N - 1; i++) {
			map.put(A[i], map.get(A[i]) + 1);
		}

		//結果出力
		for (int i = 0; i < N; i++) {
			System.out.println(map.get(i + 1));
		}
	}
} Main
import java.util.Scanner;
import java.util.SortedMap;
import java.util.TreeMap;

public class Main {

	static Main instance = new Main();

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		//入力値
		int N = scan.nextInt();
		int[] A = new int[N - 1];

		for (int i = 0; i < N - 1; i++) {
			A[i] = scan.nextInt();
		}

		//WK変数
		SortedMap<Integer, Integer> map = new TreeMap<>();

		for (int i = 0; i < N; i++) {
			map.put(i + 1, 0);
		}

		//演算
		for (int i = 0; i < N - 1; i++) {
			map.put(A[i], map.get(A[i]) + 1);
		}

		//結果出力
		for (int i = 0; i < N; i++) {
			System.out.println(map.get(i + 1));
		}
	}
}