import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.StringTokenizer;

public class Main
{
	public static void main(String[] Arguments) throws IOException 
	{
		BufferedReader BR = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer ST;
		int N = Integer.parseInt(BR.readLine()), A; HashMap<Integer, Integer> Counts = new HashMap<>();
		ST = new StringTokenizer(BR.readLine());
		for (int i = 1; i < N; i++)
		{
			A = Integer.parseInt(ST.nextToken());
			if (Counts.containsKey(A)) Counts.put(A, Counts.get(A) + 1);
			else Counts.put(A, 1);
		}
		for (int i = 1; i <= N; i++) System.out.println((Counts.containsKey(i)) ? Counts.get(i) : "0");
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.HashMap; HashMap java.util import java.util.StringTokenizer; StringTokenizer java.util public class Main
{
	public static void main(String[] Arguments) throws IOException 
	{
		BufferedReader BR = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer ST;
		int N = Integer.parseInt(BR.readLine()), A; HashMap<Integer, Integer> Counts = new HashMap<>();
		ST = new StringTokenizer(BR.readLine());
		for (int i = 1; i < N; i++)
		{
			A = Integer.parseInt(ST.nextToken());
			if (Counts.containsKey(A)) Counts.put(A, Counts.get(A) + 1);
			else Counts.put(A, 1);
		}
		for (int i = 1; i <= N; i++) System.out.println((Counts.containsKey(i)) ? Counts.get(i) : "0");
	}
} Main public static void main(String[] Arguments) throws IOException 
	{
		BufferedReader BR = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer ST;
		int N = Integer.parseInt(BR.readLine()), A; HashMap<Integer, Integer> Counts = new HashMap<>();
		ST = new StringTokenizer(BR.readLine());
		for (int i = 1; i < N; i++)
		{
			A = Integer.parseInt(ST.nextToken());
			if (Counts.containsKey(A)) Counts.put(A, Counts.get(A) + 1);
			else Counts.put(A, 1);
		}
		for (int i = 1; i <= N; i++) System.out.println((Counts.containsKey(i)) ? Counts.get(i) : "0");
	} main {
		BufferedReader BR = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer ST;
		int N = Integer.parseInt(BR.readLine()), A; HashMap<Integer, Integer> Counts = new HashMap<>();
		ST = new StringTokenizer(BR.readLine());
		for (int i = 1; i < N; i++)
		{
			A = Integer.parseInt(ST.nextToken());
			if (Counts.containsKey(A)) Counts.put(A, Counts.get(A) + 1);
			else Counts.put(A, 1);
		}
		for (int i = 1; i <= N; i++) System.out.println((Counts.containsKey(i)) ? Counts.get(i) : "0");
	} BufferedReader BR = new BufferedReader(new InputStreamReader(System.in)); BR new BufferedReader(new InputStreamReader(System.in)) StringTokenizer ST; ST int N = Integer.parseInt(BR.readLine()) N Integer.parseInt(BR.readLine()) Integer.parseInt Integer BR.readLine() BR.readLine BR A; A HashMap<Integer, Integer> Counts = new HashMap<>(); Counts new HashMap<>() ST = new StringTokenizer(BR.readLine()) ST new StringTokenizer(BR.readLine()) for (int i = 1; i < N; i++)
		{
			A = Integer.parseInt(ST.nextToken());
			if (Counts.containsKey(A)) Counts.put(A, Counts.get(A) + 1);
			else Counts.put(A, 1);
		} int i = 1; int i = 1; i 1 i < N i N i++ i++ i {
			A = Integer.parseInt(ST.nextToken());
			if (Counts.containsKey(A)) Counts.put(A, Counts.get(A) + 1);
			else Counts.put(A, 1);
		} {
			A = Integer.parseInt(ST.nextToken());
			if (Counts.containsKey(A)) Counts.put(A, Counts.get(A) + 1);
			else Counts.put(A, 1);
		} A = Integer.parseInt(ST.nextToken()) A Integer.parseInt(ST.nextToken()) Integer.parseInt Integer ST.nextToken() ST.nextToken ST if (Counts.containsKey(A)) Counts.put(A, Counts.get(A) + 1);
			else Counts.put(A, 1); Counts.containsKey(A) Counts.containsKey Counts A Counts.put(A, Counts.get(A) + 1) Counts.put Counts A Counts.get(A) + 1 Counts.get(A) Counts.get Counts A 1 Counts.put(A, 1) Counts.put Counts A 1 for (int i = 1; i <= N; i++) System.out.println((Counts.containsKey(i)) ? Counts.get(i) : "0"); int i = 1; int i = 1; i 1 i <= N i N i++ i++ i System.out.println((Counts.containsKey(i)) ? Counts.get(i) : "0"); System.out.println((Counts.containsKey(i)) ? Counts.get(i) : "0") System.out.println System.out System System.out (Counts.containsKey(i)) ? Counts.get(i) : "0" (Counts.containsKey(i)) Counts.containsKey Counts i Counts.get(i) Counts.get Counts i "0" String[] Arguments Arguments public class Main
{
	public static void main(String[] Arguments) throws IOException 
	{
		BufferedReader BR = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer ST;
		int N = Integer.parseInt(BR.readLine()), A; HashMap<Integer, Integer> Counts = new HashMap<>();
		ST = new StringTokenizer(BR.readLine());
		for (int i = 1; i < N; i++)
		{
			A = Integer.parseInt(ST.nextToken());
			if (Counts.containsKey(A)) Counts.put(A, Counts.get(A) + 1);
			else Counts.put(A, 1);
		}
		for (int i = 1; i <= N; i++) System.out.println((Counts.containsKey(i)) ? Counts.get(i) : "0");
	}
} public class Main
{
	public static void main(String[] Arguments) throws IOException 
	{
		BufferedReader BR = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer ST;
		int N = Integer.parseInt(BR.readLine()), A; HashMap<Integer, Integer> Counts = new HashMap<>();
		ST = new StringTokenizer(BR.readLine());
		for (int i = 1; i < N; i++)
		{
			A = Integer.parseInt(ST.nextToken());
			if (Counts.containsKey(A)) Counts.put(A, Counts.get(A) + 1);
			else Counts.put(A, 1);
		}
		for (int i = 1; i <= N; i++) System.out.println((Counts.containsKey(i)) ? Counts.get(i) : "0");
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.StringTokenizer;

public class Main
{
	public static void main(String[] Arguments) throws IOException 
	{
		BufferedReader BR = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer ST;
		int N = Integer.parseInt(BR.readLine()), A; HashMap<Integer, Integer> Counts = new HashMap<>();
		ST = new StringTokenizer(BR.readLine());
		for (int i = 1; i < N; i++)
		{
			A = Integer.parseInt(ST.nextToken());
			if (Counts.containsKey(A)) Counts.put(A, Counts.get(A) + 1);
			else Counts.put(A, 1);
		}
		for (int i = 1; i <= N; i++) System.out.println((Counts.containsKey(i)) ? Counts.get(i) : "0");
	}
}
