import java.util.HashMap;
import java.util.Scanner;


public class Main{
	

	
	
	public static void main(String[] args) {

		
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		
		HashMap<Integer,Integer> h = new HashMap<>();
		for(int i=1;i<n;i++) {
			int c = s.nextInt();
			if(h.containsKey(c)) {
				h.put(c, h.get(c)+1);
			}
			else {
				h.put(c, 1);
			}
		}
		for(int i=1;i<=n;i++) {
			if(h.containsKey(i))
				System.out.println(h.get(i));
			else {
				System.out.println(0);
			}
		}
		
	}
} import java.util.HashMap; HashMap java.util import java.util.Scanner; Scanner java.util public class Main{
	

	
	
	public static void main(String[] args) {

		
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		
		HashMap<Integer,Integer> h = new HashMap<>();
		for(int i=1;i<n;i++) {
			int c = s.nextInt();
			if(h.containsKey(c)) {
				h.put(c, h.get(c)+1);
			}
			else {
				h.put(c, 1);
			}
		}
		for(int i=1;i<=n;i++) {
			if(h.containsKey(i))
				System.out.println(h.get(i));
			else {
				System.out.println(0);
			}
		}
		
	}
} Main public static void main(String[] args) {

		
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		
		HashMap<Integer,Integer> h = new HashMap<>();
		for(int i=1;i<n;i++) {
			int c = s.nextInt();
			if(h.containsKey(c)) {
				h.put(c, h.get(c)+1);
			}
			else {
				h.put(c, 1);
			}
		}
		for(int i=1;i<=n;i++) {
			if(h.containsKey(i))
				System.out.println(h.get(i));
			else {
				System.out.println(0);
			}
		}
		
	} main {

		
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		
		HashMap<Integer,Integer> h = new HashMap<>();
		for(int i=1;i<n;i++) {
			int c = s.nextInt();
			if(h.containsKey(c)) {
				h.put(c, h.get(c)+1);
			}
			else {
				h.put(c, 1);
			}
		}
		for(int i=1;i<=n;i++) {
			if(h.containsKey(i))
				System.out.println(h.get(i));
			else {
				System.out.println(0);
			}
		}
		
	} Scanner s = new Scanner(System.in); s new Scanner(System.in) int n = s.nextInt(); n s.nextInt() s.nextInt s HashMap<Integer,Integer> h = new HashMap<>(); h new HashMap<>() for(int i=1;i<n;i++) {
			int c = s.nextInt();
			if(h.containsKey(c)) {
				h.put(c, h.get(c)+1);
			}
			else {
				h.put(c, 1);
			}
		} int i=1; int i=1; i 1 i<n i n i++ i++ i {
			int c = s.nextInt();
			if(h.containsKey(c)) {
				h.put(c, h.get(c)+1);
			}
			else {
				h.put(c, 1);
			}
		} {
			int c = s.nextInt();
			if(h.containsKey(c)) {
				h.put(c, h.get(c)+1);
			}
			else {
				h.put(c, 1);
			}
		} int c = s.nextInt(); c s.nextInt() s.nextInt s if(h.containsKey(c)) {
				h.put(c, h.get(c)+1);
			}
			else {
				h.put(c, 1);
			} h.containsKey(c) h.containsKey h c {
				h.put(c, h.get(c)+1);
			} h.put(c, h.get(c)+1) h.put h c h.get(c)+1 h.get(c) h.get h c 1 {
				h.put(c, 1);
			} h.put(c, 1) h.put h c 1 for(int i=1;i<=n;i++) {
			if(h.containsKey(i))
				System.out.println(h.get(i));
			else {
				System.out.println(0);
			}
		} int i=1; int i=1; i 1 i<=n i n i++ i++ i {
			if(h.containsKey(i))
				System.out.println(h.get(i));
			else {
				System.out.println(0);
			}
		} {
			if(h.containsKey(i))
				System.out.println(h.get(i));
			else {
				System.out.println(0);
			}
		} if(h.containsKey(i))
				System.out.println(h.get(i));
			else {
				System.out.println(0);
			} h.containsKey(i) h.containsKey h i System.out.println(h.get(i)) System.out.println System.out System System.out h.get(i) h.get h i {
				System.out.println(0);
			} System.out.println(0) System.out.println System.out System System.out 0 String[] args args public class Main{
	

	
	
	public static void main(String[] args) {

		
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		
		HashMap<Integer,Integer> h = new HashMap<>();
		for(int i=1;i<n;i++) {
			int c = s.nextInt();
			if(h.containsKey(c)) {
				h.put(c, h.get(c)+1);
			}
			else {
				h.put(c, 1);
			}
		}
		for(int i=1;i<=n;i++) {
			if(h.containsKey(i))
				System.out.println(h.get(i));
			else {
				System.out.println(0);
			}
		}
		
	}
} public class Main{
	

	
	
	public static void main(String[] args) {

		
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		
		HashMap<Integer,Integer> h = new HashMap<>();
		for(int i=1;i<n;i++) {
			int c = s.nextInt();
			if(h.containsKey(c)) {
				h.put(c, h.get(c)+1);
			}
			else {
				h.put(c, 1);
			}
		}
		for(int i=1;i<=n;i++) {
			if(h.containsKey(i))
				System.out.println(h.get(i));
			else {
				System.out.println(0);
			}
		}
		
	}
} Main
import java.util.HashMap;
import java.util.Scanner;


public class Main{
	

	
	
	public static void main(String[] args) {

		
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		
		HashMap<Integer,Integer> h = new HashMap<>();
		for(int i=1;i<n;i++) {
			int c = s.nextInt();
			if(h.containsKey(c)) {
				h.put(c, h.get(c)+1);
			}
			else {
				h.put(c, 1);
			}
		}
		for(int i=1;i<=n;i++) {
			if(h.containsKey(i))
				System.out.println(h.get(i));
			else {
				System.out.println(0);
			}
		}
		
	}
}