import java.util.Arrays;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] A = new int[N-1];
		int[] count = new int[N];
		Arrays.fill(count, 0);
		for(int i = 0;i < N-1;i++){
			A[i] = sc.nextInt();
		}
		sc.close();
		count[0]++;
		for(int i = 1;i < N-1;i++){
			if(A[i-1]==A[i]){
				count[A[i-1]-1]++;
			}else{
				count[A[i]-1]++;
			}
		}
		for(int num : count){
			System.out.println(num);
		}
	}

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] A = new int[N-1];
		int[] count = new int[N];
		Arrays.fill(count, 0);
		for(int i = 0;i < N-1;i++){
			A[i] = sc.nextInt();
		}
		sc.close();
		count[0]++;
		for(int i = 1;i < N-1;i++){
			if(A[i-1]==A[i]){
				count[A[i-1]-1]++;
			}else{
				count[A[i]-1]++;
			}
		}
		for(int num : count){
			System.out.println(num);
		}
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] A = new int[N-1];
		int[] count = new int[N];
		Arrays.fill(count, 0);
		for(int i = 0;i < N-1;i++){
			A[i] = sc.nextInt();
		}
		sc.close();
		count[0]++;
		for(int i = 1;i < N-1;i++){
			if(A[i-1]==A[i]){
				count[A[i-1]-1]++;
			}else{
				count[A[i]-1]++;
			}
		}
		for(int num : count){
			System.out.println(num);
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] A = new int[N-1];
		int[] count = new int[N];
		Arrays.fill(count, 0);
		for(int i = 0;i < N-1;i++){
			A[i] = sc.nextInt();
		}
		sc.close();
		count[0]++;
		for(int i = 1;i < N-1;i++){
			if(A[i-1]==A[i]){
				count[A[i-1]-1]++;
			}else{
				count[A[i]-1]++;
			}
		}
		for(int num : count){
			System.out.println(num);
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int[] A = new int[N-1]; A new int[N-1] N-1 N 1 int[] count = new int[N]; count new int[N] N Arrays.fill(count, 0) Arrays.fill Arrays count 0 for(int i = 0;i < N-1;i++){
			A[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < N-1 i N-1 N 1 i++ i++ i {
			A[i] = sc.nextInt();
		} {
			A[i] = sc.nextInt();
		} A[i] = sc.nextInt() A[i] A i sc.nextInt() sc.nextInt sc sc.close() sc.close sc count[0]++ count[0] count 0 for(int i = 1;i < N-1;i++){
			if(A[i-1]==A[i]){
				count[A[i-1]-1]++;
			}else{
				count[A[i]-1]++;
			}
		} int i = 1; int i = 1; i 1 i < N-1 i N-1 N 1 i++ i++ i {
			if(A[i-1]==A[i]){
				count[A[i-1]-1]++;
			}else{
				count[A[i]-1]++;
			}
		} {
			if(A[i-1]==A[i]){
				count[A[i-1]-1]++;
			}else{
				count[A[i]-1]++;
			}
		} if(A[i-1]==A[i]){
				count[A[i-1]-1]++;
			}else{
				count[A[i]-1]++;
			} A[i-1]==A[i] A[i-1] A i-1 i 1 A[i] A i {
				count[A[i-1]-1]++;
			} count[A[i-1]-1]++ count[A[i-1]-1] count A[i-1]-1 A[i-1] A i-1 i 1 1 {
				count[A[i]-1]++;
			} count[A[i]-1]++ count[A[i]-1] count A[i]-1 A[i] A i 1 for(int num : count){
			System.out.println(num);
		} int num count {
			System.out.println(num);
		} {
			System.out.println(num);
		} System.out.println(num) System.out.println System.out System System.out num String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] A = new int[N-1];
		int[] count = new int[N];
		Arrays.fill(count, 0);
		for(int i = 0;i < N-1;i++){
			A[i] = sc.nextInt();
		}
		sc.close();
		count[0]++;
		for(int i = 1;i < N-1;i++){
			if(A[i-1]==A[i]){
				count[A[i-1]-1]++;
			}else{
				count[A[i]-1]++;
			}
		}
		for(int num : count){
			System.out.println(num);
		}
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] A = new int[N-1];
		int[] count = new int[N];
		Arrays.fill(count, 0);
		for(int i = 0;i < N-1;i++){
			A[i] = sc.nextInt();
		}
		sc.close();
		count[0]++;
		for(int i = 1;i < N-1;i++){
			if(A[i-1]==A[i]){
				count[A[i-1]-1]++;
			}else{
				count[A[i]-1]++;
			}
		}
		for(int num : count){
			System.out.println(num);
		}
	}

} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] A = new int[N-1];
		int[] count = new int[N];
		Arrays.fill(count, 0);
		for(int i = 0;i < N-1;i++){
			A[i] = sc.nextInt();
		}
		sc.close();
		count[0]++;
		for(int i = 1;i < N-1;i++){
			if(A[i-1]==A[i]){
				count[A[i-1]-1]++;
			}else{
				count[A[i]-1]++;
			}
		}
		for(int num : count){
			System.out.println(num);
		}
	}

}