import java.util.*;
import java.util.stream.Collectors;
import java.io.*;
import java.nio.charset.StandardCharsets;

public class Main {
	int N;
	int[] A;

	public static void main(String[] args) throws IOException {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		Main ins = new Main(in);
		ins.calc();
		ins.showResult();
	}

	Main(BufferedReader in) throws IOException {
		N = Integer.parseInt(in.readLine());
		String[] tokens = in.readLine().split(" ");
		A = new int[N];
		Arrays.fill(A, 0);
		for (int i = 1; i < N; ++i) {
			A[i] = Integer.parseInt(tokens[i - 1]) - 1;
		}
		int[] sums = new int[N];
		Arrays.fill(sums, 0);
		for (int i = 1; i < N; ++i) {
			sums[A[i]]++;
		}
		for (int i = 0; i < N; ++i) {
			System.out.println(sums[i]);
		}
	}

	void calc() {
	}

	void showResult() {
	}
} import java.util.*; util.* java import java.util.stream.Collectors; Collectors java.util.stream import java.io.*; io.* java import java.nio.charset.StandardCharsets; StandardCharsets java.nio.charset public class Main {
	int N;
	int[] A;

	public static void main(String[] args) throws IOException {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		Main ins = new Main(in);
		ins.calc();
		ins.showResult();
	}

	Main(BufferedReader in) throws IOException {
		N = Integer.parseInt(in.readLine());
		String[] tokens = in.readLine().split(" ");
		A = new int[N];
		Arrays.fill(A, 0);
		for (int i = 1; i < N; ++i) {
			A[i] = Integer.parseInt(tokens[i - 1]) - 1;
		}
		int[] sums = new int[N];
		Arrays.fill(sums, 0);
		for (int i = 1; i < N; ++i) {
			sums[A[i]]++;
		}
		for (int i = 0; i < N; ++i) {
			System.out.println(sums[i]);
		}
	}

	void calc() {
	}

	void showResult() {
	}
} Main int N; N int[] A; A public static void main(String[] args) throws IOException {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		Main ins = new Main(in);
		ins.calc();
		ins.showResult();
	} main {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		Main ins = new Main(in);
		ins.calc();
		ins.showResult();
	} InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8); reader new InputStreamReader(System.in, StandardCharsets.UTF_8) BufferedReader in = new BufferedReader(reader); in new BufferedReader(reader) Main ins = new Main(in); ins new Main(in) ins.calc() ins.calc ins ins.showResult() ins.showResult ins String[] args args Main(BufferedReader in) throws IOException {
		N = Integer.parseInt(in.readLine());
		String[] tokens = in.readLine().split(" ");
		A = new int[N];
		Arrays.fill(A, 0);
		for (int i = 1; i < N; ++i) {
			A[i] = Integer.parseInt(tokens[i - 1]) - 1;
		}
		int[] sums = new int[N];
		Arrays.fill(sums, 0);
		for (int i = 1; i < N; ++i) {
			sums[A[i]]++;
		}
		for (int i = 0; i < N; ++i) {
			System.out.println(sums[i]);
		}
	} Main {
		N = Integer.parseInt(in.readLine());
		String[] tokens = in.readLine().split(" ");
		A = new int[N];
		Arrays.fill(A, 0);
		for (int i = 1; i < N; ++i) {
			A[i] = Integer.parseInt(tokens[i - 1]) - 1;
		}
		int[] sums = new int[N];
		Arrays.fill(sums, 0);
		for (int i = 1; i < N; ++i) {
			sums[A[i]]++;
		}
		for (int i = 0; i < N; ++i) {
			System.out.println(sums[i]);
		}
	} N = Integer.parseInt(in.readLine()) N Integer.parseInt(in.readLine()) Integer.parseInt Integer in.readLine() in.readLine in String[] tokens = in.readLine().split(" "); tokens in.readLine().split(" ") in.readLine().split in.readLine() in.readLine in " " A = new int[N] A new int[N] N Arrays.fill(A, 0) Arrays.fill Arrays A 0 for (int i = 1; i < N; ++i) {
			A[i] = Integer.parseInt(tokens[i - 1]) - 1;
		} int i = 1; int i = 1; i 1 i < N i N ++i ++i i {
			A[i] = Integer.parseInt(tokens[i - 1]) - 1;
		} {
			A[i] = Integer.parseInt(tokens[i - 1]) - 1;
		} A[i] = Integer.parseInt(tokens[i - 1]) - 1 A[i] A i Integer.parseInt(tokens[i - 1]) - 1 Integer.parseInt(tokens[i - 1]) Integer.parseInt Integer tokens[i - 1] tokens i - 1 i 1 1 int[] sums = new int[N]; sums new int[N] N Arrays.fill(sums, 0) Arrays.fill Arrays sums 0 for (int i = 1; i < N; ++i) {
			sums[A[i]]++;
		} int i = 1; int i = 1; i 1 i < N i N ++i ++i i {
			sums[A[i]]++;
		} {
			sums[A[i]]++;
		} sums[A[i]]++ sums[A[i]] sums A[i] A i for (int i = 0; i < N; ++i) {
			System.out.println(sums[i]);
		} int i = 0; int i = 0; i 0 i < N i N ++i ++i i {
			System.out.println(sums[i]);
		} {
			System.out.println(sums[i]);
		} System.out.println(sums[i]) System.out.println System.out System System.out sums[i] sums i BufferedReader in in void calc() {
	} calc {
	} void showResult() {
	} showResult {
	} public class Main {
	int N;
	int[] A;

	public static void main(String[] args) throws IOException {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		Main ins = new Main(in);
		ins.calc();
		ins.showResult();
	}

	Main(BufferedReader in) throws IOException {
		N = Integer.parseInt(in.readLine());
		String[] tokens = in.readLine().split(" ");
		A = new int[N];
		Arrays.fill(A, 0);
		for (int i = 1; i < N; ++i) {
			A[i] = Integer.parseInt(tokens[i - 1]) - 1;
		}
		int[] sums = new int[N];
		Arrays.fill(sums, 0);
		for (int i = 1; i < N; ++i) {
			sums[A[i]]++;
		}
		for (int i = 0; i < N; ++i) {
			System.out.println(sums[i]);
		}
	}

	void calc() {
	}

	void showResult() {
	}
} public class Main {
	int N;
	int[] A;

	public static void main(String[] args) throws IOException {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		Main ins = new Main(in);
		ins.calc();
		ins.showResult();
	}

	Main(BufferedReader in) throws IOException {
		N = Integer.parseInt(in.readLine());
		String[] tokens = in.readLine().split(" ");
		A = new int[N];
		Arrays.fill(A, 0);
		for (int i = 1; i < N; ++i) {
			A[i] = Integer.parseInt(tokens[i - 1]) - 1;
		}
		int[] sums = new int[N];
		Arrays.fill(sums, 0);
		for (int i = 1; i < N; ++i) {
			sums[A[i]]++;
		}
		for (int i = 0; i < N; ++i) {
			System.out.println(sums[i]);
		}
	}

	void calc() {
	}

	void showResult() {
	}
} Main
import java.util.*;
import java.util.stream.Collectors;
import java.io.*;
import java.nio.charset.StandardCharsets;

public class Main {
	int N;
	int[] A;

	public static void main(String[] args) throws IOException {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		Main ins = new Main(in);
		ins.calc();
		ins.showResult();
	}

	Main(BufferedReader in) throws IOException {
		N = Integer.parseInt(in.readLine());
		String[] tokens = in.readLine().split(" ");
		A = new int[N];
		Arrays.fill(A, 0);
		for (int i = 1; i < N; ++i) {
			A[i] = Integer.parseInt(tokens[i - 1]) - 1;
		}
		int[] sums = new int[N];
		Arrays.fill(sums, 0);
		for (int i = 1; i < N; ++i) {
			sums[A[i]]++;
		}
		for (int i = 0; i < N; ++i) {
			System.out.println(sums[i]);
		}
	}

	void calc() {
	}

	void showResult() {
	}
}
