import java.util.Scanner;
import java.util.TreeMap;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		
		TreeMap<Integer, Integer> a = new TreeMap<>();
		
		for(int i =1; i <= n; i++) {
			a.put(i, 0);
		}
		
		for(int i = 0; i < n - 1; i++) {
			int key = sc.nextInt();
			a.put(key,a.get(key)+1);
		}

		for (Integer key : a.keySet()) {
			System.out.println(a.get(key));
		}

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

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		
		TreeMap<Integer, Integer> a = new TreeMap<>();
		
		for(int i =1; i <= n; i++) {
			a.put(i, 0);
		}
		
		for(int i = 0; i < n - 1; i++) {
			int key = sc.nextInt();
			a.put(key,a.get(key)+1);
		}

		for (Integer key : a.keySet()) {
			System.out.println(a.get(key));
		}

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

		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		
		TreeMap<Integer, Integer> a = new TreeMap<>();
		
		for(int i =1; i <= n; i++) {
			a.put(i, 0);
		}
		
		for(int i = 0; i < n - 1; i++) {
			int key = sc.nextInt();
			a.put(key,a.get(key)+1);
		}

		for (Integer key : a.keySet()) {
			System.out.println(a.get(key));
		}

	} main {

		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		
		TreeMap<Integer, Integer> a = new TreeMap<>();
		
		for(int i =1; i <= n; i++) {
			a.put(i, 0);
		}
		
		for(int i = 0; i < n - 1; i++) {
			int key = sc.nextInt();
			a.put(key,a.get(key)+1);
		}

		for (Integer key : a.keySet()) {
			System.out.println(a.get(key));
		}

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc TreeMap<Integer, Integer> a = new TreeMap<>(); a new TreeMap<>() for(int i =1; i <= n; i++) {
			a.put(i, 0);
		} int i =1; int i =1; i 1 i <= n i n i++ i++ i {
			a.put(i, 0);
		} {
			a.put(i, 0);
		} a.put(i, 0) a.put a i 0 for(int i = 0; i < n - 1; i++) {
			int key = sc.nextInt();
			a.put(key,a.get(key)+1);
		} int i = 0; int i = 0; i 0 i < n - 1 i n - 1 n 1 i++ i++ i {
			int key = sc.nextInt();
			a.put(key,a.get(key)+1);
		} {
			int key = sc.nextInt();
			a.put(key,a.get(key)+1);
		} int key = sc.nextInt(); key sc.nextInt() sc.nextInt sc a.put(key,a.get(key)+1) a.put a key a.get(key)+1 a.get(key) a.get a key 1 for (Integer key : a.keySet()) {
			System.out.println(a.get(key));
		} Integer key a.keySet() a.keySet a {
			System.out.println(a.get(key));
		} {
			System.out.println(a.get(key));
		} System.out.println(a.get(key)) System.out.println System.out System System.out a.get(key) a.get a key String[] args args public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		
		TreeMap<Integer, Integer> a = new TreeMap<>();
		
		for(int i =1; i <= n; i++) {
			a.put(i, 0);
		}
		
		for(int i = 0; i < n - 1; i++) {
			int key = sc.nextInt();
			a.put(key,a.get(key)+1);
		}

		for (Integer key : a.keySet()) {
			System.out.println(a.get(key));
		}

	}
} public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		
		TreeMap<Integer, Integer> a = new TreeMap<>();
		
		for(int i =1; i <= n; i++) {
			a.put(i, 0);
		}
		
		for(int i = 0; i < n - 1; i++) {
			int key = sc.nextInt();
			a.put(key,a.get(key)+1);
		}

		for (Integer key : a.keySet()) {
			System.out.println(a.get(key));
		}

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

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		
		TreeMap<Integer, Integer> a = new TreeMap<>();
		
		for(int i =1; i <= n; i++) {
			a.put(i, 0);
		}
		
		for(int i = 0; i < n - 1; i++) {
			int key = sc.nextInt();
			a.put(key,a.get(key)+1);
		}

		for (Integer key : a.keySet()) {
			System.out.println(a.get(key));
		}

	}
}
