import java.util.Scanner;

public class Main {

	public static void main(String[] args) {


		Scanner scanner = new Scanner(System.in);

		int n = Integer.parseInt(scanner.nextLine());

		String[] tempList = scanner.nextLine().split(" ");
		int[] list = new int[n - 1];
		int[] resultList = new int[n];
		for(int i= 0; i < n - 1; i++) {
			list[i] = Integer.parseInt(tempList[i]);
		}

		for(int i : list) {
			int temp = i;
			resultList[i - 1] ++;
		}

		for(int i = 0; i < n; i++) {
			int result = 0;
			for(int j = resultList[i]; j > 0; j--) {
				result ++;
			}
			System.out.println(result);
		}

	}

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

	public static void main(String[] args) {


		Scanner scanner = new Scanner(System.in);

		int n = Integer.parseInt(scanner.nextLine());

		String[] tempList = scanner.nextLine().split(" ");
		int[] list = new int[n - 1];
		int[] resultList = new int[n];
		for(int i= 0; i < n - 1; i++) {
			list[i] = Integer.parseInt(tempList[i]);
		}

		for(int i : list) {
			int temp = i;
			resultList[i - 1] ++;
		}

		for(int i = 0; i < n; i++) {
			int result = 0;
			for(int j = resultList[i]; j > 0; j--) {
				result ++;
			}
			System.out.println(result);
		}

	}

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


		Scanner scanner = new Scanner(System.in);

		int n = Integer.parseInt(scanner.nextLine());

		String[] tempList = scanner.nextLine().split(" ");
		int[] list = new int[n - 1];
		int[] resultList = new int[n];
		for(int i= 0; i < n - 1; i++) {
			list[i] = Integer.parseInt(tempList[i]);
		}

		for(int i : list) {
			int temp = i;
			resultList[i - 1] ++;
		}

		for(int i = 0; i < n; i++) {
			int result = 0;
			for(int j = resultList[i]; j > 0; j--) {
				result ++;
			}
			System.out.println(result);
		}

	} main {


		Scanner scanner = new Scanner(System.in);

		int n = Integer.parseInt(scanner.nextLine());

		String[] tempList = scanner.nextLine().split(" ");
		int[] list = new int[n - 1];
		int[] resultList = new int[n];
		for(int i= 0; i < n - 1; i++) {
			list[i] = Integer.parseInt(tempList[i]);
		}

		for(int i : list) {
			int temp = i;
			resultList[i - 1] ++;
		}

		for(int i = 0; i < n; i++) {
			int result = 0;
			for(int j = resultList[i]; j > 0; j--) {
				result ++;
			}
			System.out.println(result);
		}

	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int n = Integer.parseInt(scanner.nextLine()); n Integer.parseInt(scanner.nextLine()) Integer.parseInt Integer scanner.nextLine() scanner.nextLine scanner String[] tempList = scanner.nextLine().split(" "); tempList scanner.nextLine().split(" ") scanner.nextLine().split scanner.nextLine() scanner.nextLine scanner " " int[] list = new int[n - 1]; list new int[n - 1] n - 1 n 1 int[] resultList = new int[n]; resultList new int[n] n for(int i= 0; i < n - 1; i++) {
			list[i] = Integer.parseInt(tempList[i]);
		} int i= 0; int i= 0; i 0 i < n - 1 i n - 1 n 1 i++ i++ i {
			list[i] = Integer.parseInt(tempList[i]);
		} {
			list[i] = Integer.parseInt(tempList[i]);
		} list[i] = Integer.parseInt(tempList[i]) list[i] list i Integer.parseInt(tempList[i]) Integer.parseInt Integer tempList[i] tempList i for(int i : list) {
			int temp = i;
			resultList[i - 1] ++;
		} int i list {
			int temp = i;
			resultList[i - 1] ++;
		} {
			int temp = i;
			resultList[i - 1] ++;
		} int temp = i; temp i resultList[i - 1] ++ resultList[i - 1] resultList i - 1 i 1 for(int i = 0; i < n; i++) {
			int result = 0;
			for(int j = resultList[i]; j > 0; j--) {
				result ++;
			}
			System.out.println(result);
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			int result = 0;
			for(int j = resultList[i]; j > 0; j--) {
				result ++;
			}
			System.out.println(result);
		} {
			int result = 0;
			for(int j = resultList[i]; j > 0; j--) {
				result ++;
			}
			System.out.println(result);
		} int result = 0; result 0 for(int j = resultList[i]; j > 0; j--) {
				result ++;
			} int j = resultList[i]; int j = resultList[i]; j resultList[i] resultList i j > 0 j 0 j-- j-- j {
				result ++;
			} {
				result ++;
			} result ++ result System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {

	public static void main(String[] args) {


		Scanner scanner = new Scanner(System.in);

		int n = Integer.parseInt(scanner.nextLine());

		String[] tempList = scanner.nextLine().split(" ");
		int[] list = new int[n - 1];
		int[] resultList = new int[n];
		for(int i= 0; i < n - 1; i++) {
			list[i] = Integer.parseInt(tempList[i]);
		}

		for(int i : list) {
			int temp = i;
			resultList[i - 1] ++;
		}

		for(int i = 0; i < n; i++) {
			int result = 0;
			for(int j = resultList[i]; j > 0; j--) {
				result ++;
			}
			System.out.println(result);
		}

	}

} public class Main {

	public static void main(String[] args) {


		Scanner scanner = new Scanner(System.in);

		int n = Integer.parseInt(scanner.nextLine());

		String[] tempList = scanner.nextLine().split(" ");
		int[] list = new int[n - 1];
		int[] resultList = new int[n];
		for(int i= 0; i < n - 1; i++) {
			list[i] = Integer.parseInt(tempList[i]);
		}

		for(int i : list) {
			int temp = i;
			resultList[i - 1] ++;
		}

		for(int i = 0; i < n; i++) {
			int result = 0;
			for(int j = resultList[i]; j > 0; j--) {
				result ++;
			}
			System.out.println(result);
		}

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {


		Scanner scanner = new Scanner(System.in);

		int n = Integer.parseInt(scanner.nextLine());

		String[] tempList = scanner.nextLine().split(" ");
		int[] list = new int[n - 1];
		int[] resultList = new int[n];
		for(int i= 0; i < n - 1; i++) {
			list[i] = Integer.parseInt(tempList[i]);
		}

		for(int i : list) {
			int temp = i;
			resultList[i - 1] ++;
		}

		for(int i = 0; i < n; i++) {
			int result = 0;
			for(int j = resultList[i]; j > 0; j--) {
				result ++;
			}
			System.out.println(result);
		}

	}

}
