import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        Map<Integer, Integer> resultMap = new HashMap<>();
        for (int i = 1; i < N; i++) {
            int boss = sc.nextInt();
            Integer count = resultMap.get(boss);
            if (Objects.isNull(count)) {
                count = 1;
            } else {
                count += 1;
            }
            resultMap.put(boss, count);
        }

        for (int i = 1; i <= N; i++) {
            Integer val = resultMap.get(i);
            if (Objects.isNull(val)) {
                System.out.println(0);
            } else {
                System.out.println(val);
            }
        }
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        Map<Integer, Integer> resultMap = new HashMap<>();
        for (int i = 1; i < N; i++) {
            int boss = sc.nextInt();
            Integer count = resultMap.get(boss);
            if (Objects.isNull(count)) {
                count = 1;
            } else {
                count += 1;
            }
            resultMap.put(boss, count);
        }

        for (int i = 1; i <= N; i++) {
            Integer val = resultMap.get(i);
            if (Objects.isNull(val)) {
                System.out.println(0);
            } else {
                System.out.println(val);
            }
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        Map<Integer, Integer> resultMap = new HashMap<>();
        for (int i = 1; i < N; i++) {
            int boss = sc.nextInt();
            Integer count = resultMap.get(boss);
            if (Objects.isNull(count)) {
                count = 1;
            } else {
                count += 1;
            }
            resultMap.put(boss, count);
        }

        for (int i = 1; i <= N; i++) {
            Integer val = resultMap.get(i);
            if (Objects.isNull(val)) {
                System.out.println(0);
            } else {
                System.out.println(val);
            }
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        Map<Integer, Integer> resultMap = new HashMap<>();
        for (int i = 1; i < N; i++) {
            int boss = sc.nextInt();
            Integer count = resultMap.get(boss);
            if (Objects.isNull(count)) {
                count = 1;
            } else {
                count += 1;
            }
            resultMap.put(boss, count);
        }

        for (int i = 1; i <= N; i++) {
            Integer val = resultMap.get(i);
            if (Objects.isNull(val)) {
                System.out.println(0);
            } else {
                System.out.println(val);
            }
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc Map<Integer, Integer> resultMap = new HashMap<>(); resultMap new HashMap<>() for (int i = 1; i < N; i++) {
            int boss = sc.nextInt();
            Integer count = resultMap.get(boss);
            if (Objects.isNull(count)) {
                count = 1;
            } else {
                count += 1;
            }
            resultMap.put(boss, count);
        } int i = 1; int i = 1; i 1 i < N i N i++ i++ i {
            int boss = sc.nextInt();
            Integer count = resultMap.get(boss);
            if (Objects.isNull(count)) {
                count = 1;
            } else {
                count += 1;
            }
            resultMap.put(boss, count);
        } {
            int boss = sc.nextInt();
            Integer count = resultMap.get(boss);
            if (Objects.isNull(count)) {
                count = 1;
            } else {
                count += 1;
            }
            resultMap.put(boss, count);
        } int boss = sc.nextInt(); boss sc.nextInt() sc.nextInt sc Integer count = resultMap.get(boss); count resultMap.get(boss) resultMap.get resultMap boss if (Objects.isNull(count)) {
                count = 1;
            } else {
                count += 1;
            } Objects.isNull(count) Objects.isNull Objects count {
                count = 1;
            } count = 1 count 1 {
                count += 1;
            } count += 1 count 1 resultMap.put(boss, count) resultMap.put resultMap boss count for (int i = 1; i <= N; i++) {
            Integer val = resultMap.get(i);
            if (Objects.isNull(val)) {
                System.out.println(0);
            } else {
                System.out.println(val);
            }
        } int i = 1; int i = 1; i 1 i <= N i N i++ i++ i {
            Integer val = resultMap.get(i);
            if (Objects.isNull(val)) {
                System.out.println(0);
            } else {
                System.out.println(val);
            }
        } {
            Integer val = resultMap.get(i);
            if (Objects.isNull(val)) {
                System.out.println(0);
            } else {
                System.out.println(val);
            }
        } Integer val = resultMap.get(i); val resultMap.get(i) resultMap.get resultMap i if (Objects.isNull(val)) {
                System.out.println(0);
            } else {
                System.out.println(val);
            } Objects.isNull(val) Objects.isNull Objects val {
                System.out.println(0);
            } System.out.println(0) System.out.println System.out System System.out 0 {
                System.out.println(val);
            } System.out.println(val) System.out.println System.out System System.out val String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        Map<Integer, Integer> resultMap = new HashMap<>();
        for (int i = 1; i < N; i++) {
            int boss = sc.nextInt();
            Integer count = resultMap.get(boss);
            if (Objects.isNull(count)) {
                count = 1;
            } else {
                count += 1;
            }
            resultMap.put(boss, count);
        }

        for (int i = 1; i <= N; i++) {
            Integer val = resultMap.get(i);
            if (Objects.isNull(val)) {
                System.out.println(0);
            } else {
                System.out.println(val);
            }
        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        Map<Integer, Integer> resultMap = new HashMap<>();
        for (int i = 1; i < N; i++) {
            int boss = sc.nextInt();
            Integer count = resultMap.get(boss);
            if (Objects.isNull(count)) {
                count = 1;
            } else {
                count += 1;
            }
            resultMap.put(boss, count);
        }

        for (int i = 1; i <= N; i++) {
            Integer val = resultMap.get(i);
            if (Objects.isNull(val)) {
                System.out.println(0);
            } else {
                System.out.println(val);
            }
        }
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        Map<Integer, Integer> resultMap = new HashMap<>();
        for (int i = 1; i < N; i++) {
            int boss = sc.nextInt();
            Integer count = resultMap.get(boss);
            if (Objects.isNull(count)) {
                count = 1;
            } else {
                count += 1;
            }
            resultMap.put(boss, count);
        }

        for (int i = 1; i <= N; i++) {
            Integer val = resultMap.get(i);
            if (Objects.isNull(val)) {
                System.out.println(0);
            } else {
                System.out.println(val);
            }
        }
    }
}
