import java.util.*;
public class Main {
	public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int key = 0;
        int num = 0;
        boolean flag = false;
        Map<Integer, Integer> map = new HashMap<>();

        for(int i = 1; i < N; i++) {
        	key = sc.nextInt();
        	flag = map.containsKey(key);
        	if(flag) {
        		num = map.get(key);
        		num++;
        		map.put(key, num);
        	} else {
        		map.put(key, 1);
        	}
        }

        for(int j = 1; j <= N; j++) {
        	if(map.get(j) != null) {
        		System.out.println(map.get(j));
        	} else {
        		System.out.println(0);
        	}
        }
    }
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int key = 0;
        int num = 0;
        boolean flag = false;
        Map<Integer, Integer> map = new HashMap<>();

        for(int i = 1; i < N; i++) {
        	key = sc.nextInt();
        	flag = map.containsKey(key);
        	if(flag) {
        		num = map.get(key);
        		num++;
        		map.put(key, num);
        	} else {
        		map.put(key, 1);
        	}
        }

        for(int j = 1; j <= N; j++) {
        	if(map.get(j) != null) {
        		System.out.println(map.get(j));
        	} else {
        		System.out.println(0);
        	}
        }
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int key = 0;
        int num = 0;
        boolean flag = false;
        Map<Integer, Integer> map = new HashMap<>();

        for(int i = 1; i < N; i++) {
        	key = sc.nextInt();
        	flag = map.containsKey(key);
        	if(flag) {
        		num = map.get(key);
        		num++;
        		map.put(key, num);
        	} else {
        		map.put(key, 1);
        	}
        }

        for(int j = 1; j <= N; j++) {
        	if(map.get(j) != null) {
        		System.out.println(map.get(j));
        	} else {
        		System.out.println(0);
        	}
        }
    } main {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int key = 0;
        int num = 0;
        boolean flag = false;
        Map<Integer, Integer> map = new HashMap<>();

        for(int i = 1; i < N; i++) {
        	key = sc.nextInt();
        	flag = map.containsKey(key);
        	if(flag) {
        		num = map.get(key);
        		num++;
        		map.put(key, num);
        	} else {
        		map.put(key, 1);
        	}
        }

        for(int j = 1; j <= N; j++) {
        	if(map.get(j) != null) {
        		System.out.println(map.get(j));
        	} else {
        		System.out.println(0);
        	}
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int key = 0; key 0 int num = 0; num 0 boolean flag = false; flag false Map<Integer, Integer> map = new HashMap<>(); map new HashMap<>() for(int i = 1; i < N; i++) {
        	key = sc.nextInt();
        	flag = map.containsKey(key);
        	if(flag) {
        		num = map.get(key);
        		num++;
        		map.put(key, num);
        	} else {
        		map.put(key, 1);
        	}
        } int i = 1; int i = 1; i 1 i < N i N i++ i++ i {
        	key = sc.nextInt();
        	flag = map.containsKey(key);
        	if(flag) {
        		num = map.get(key);
        		num++;
        		map.put(key, num);
        	} else {
        		map.put(key, 1);
        	}
        } {
        	key = sc.nextInt();
        	flag = map.containsKey(key);
        	if(flag) {
        		num = map.get(key);
        		num++;
        		map.put(key, num);
        	} else {
        		map.put(key, 1);
        	}
        } key = sc.nextInt() key sc.nextInt() sc.nextInt sc flag = map.containsKey(key) flag map.containsKey(key) map.containsKey map key if(flag) {
        		num = map.get(key);
        		num++;
        		map.put(key, num);
        	} else {
        		map.put(key, 1);
        	} flag {
        		num = map.get(key);
        		num++;
        		map.put(key, num);
        	} num = map.get(key) num map.get(key) map.get map key num++ num map.put(key, num) map.put map key num {
        		map.put(key, 1);
        	} map.put(key, 1) map.put map key 1 for(int j = 1; j <= N; j++) {
        	if(map.get(j) != null) {
        		System.out.println(map.get(j));
        	} else {
        		System.out.println(0);
        	}
        } int j = 1; int j = 1; j 1 j <= N j N j++ j++ j {
        	if(map.get(j) != null) {
        		System.out.println(map.get(j));
        	} else {
        		System.out.println(0);
        	}
        } {
        	if(map.get(j) != null) {
        		System.out.println(map.get(j));
        	} else {
        		System.out.println(0);
        	}
        } if(map.get(j) != null) {
        		System.out.println(map.get(j));
        	} else {
        		System.out.println(0);
        	} map.get(j) != null map.get(j) map.get map j null {
        		System.out.println(map.get(j));
        	} System.out.println(map.get(j)) System.out.println System.out System System.out map.get(j) map.get map j {
        		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 sc = new Scanner(System.in);

        int N = sc.nextInt();
        int key = 0;
        int num = 0;
        boolean flag = false;
        Map<Integer, Integer> map = new HashMap<>();

        for(int i = 1; i < N; i++) {
        	key = sc.nextInt();
        	flag = map.containsKey(key);
        	if(flag) {
        		num = map.get(key);
        		num++;
        		map.put(key, num);
        	} else {
        		map.put(key, 1);
        	}
        }

        for(int j = 1; j <= N; j++) {
        	if(map.get(j) != null) {
        		System.out.println(map.get(j));
        	} else {
        		System.out.println(0);
        	}
        }
    }
} public class Main {
	public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int key = 0;
        int num = 0;
        boolean flag = false;
        Map<Integer, Integer> map = new HashMap<>();

        for(int i = 1; i < N; i++) {
        	key = sc.nextInt();
        	flag = map.containsKey(key);
        	if(flag) {
        		num = map.get(key);
        		num++;
        		map.put(key, num);
        	} else {
        		map.put(key, 1);
        	}
        }

        for(int j = 1; j <= N; j++) {
        	if(map.get(j) != null) {
        		System.out.println(map.get(j));
        	} else {
        		System.out.println(0);
        	}
        }
    }
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int key = 0;
        int num = 0;
        boolean flag = false;
        Map<Integer, Integer> map = new HashMap<>();

        for(int i = 1; i < N; i++) {
        	key = sc.nextInt();
        	flag = map.containsKey(key);
        	if(flag) {
        		num = map.get(key);
        		num++;
        		map.put(key, num);
        	} else {
        		map.put(key, 1);
        	}
        }

        for(int j = 1; j <= N; j++) {
        	if(map.get(j) != null) {
        		System.out.println(map.get(j));
        	} else {
        		System.out.println(0);
        	}
        }
    }
}