import java.util.*;

public class Main {
    public static void main(String args[]) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        Map<Integer, Integer> map = new HashMap<>();
        for (int i = 0; i < n-1; i++) {
            int val = scanner.nextInt() - 1;
            int count = map.getOrDefault(val, 0);
            map.put(val, ++count);
        }

        for (int i = 0; i < n; i++) {
            System.out.println(map.getOrDefault(i, 0));
        }
    }
} import java.util.*; util.* java public class Main {
    public static void main(String args[]) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        Map<Integer, Integer> map = new HashMap<>();
        for (int i = 0; i < n-1; i++) {
            int val = scanner.nextInt() - 1;
            int count = map.getOrDefault(val, 0);
            map.put(val, ++count);
        }

        for (int i = 0; i < n; i++) {
            System.out.println(map.getOrDefault(i, 0));
        }
    }
} Main public static void main(String args[]) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        Map<Integer, Integer> map = new HashMap<>();
        for (int i = 0; i < n-1; i++) {
            int val = scanner.nextInt() - 1;
            int count = map.getOrDefault(val, 0);
            map.put(val, ++count);
        }

        for (int i = 0; i < n; i++) {
            System.out.println(map.getOrDefault(i, 0));
        }
    } main {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        Map<Integer, Integer> map = new HashMap<>();
        for (int i = 0; i < n-1; i++) {
            int val = scanner.nextInt() - 1;
            int count = map.getOrDefault(val, 0);
            map.put(val, ++count);
        }

        for (int i = 0; i < n; i++) {
            System.out.println(map.getOrDefault(i, 0));
        }
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner Map<Integer, Integer> map = new HashMap<>(); map new HashMap<>() for (int i = 0; i < n-1; i++) {
            int val = scanner.nextInt() - 1;
            int count = map.getOrDefault(val, 0);
            map.put(val, ++count);
        } int i = 0; int i = 0; i 0 i < n-1 i n-1 n 1 i++ i++ i {
            int val = scanner.nextInt() - 1;
            int count = map.getOrDefault(val, 0);
            map.put(val, ++count);
        } {
            int val = scanner.nextInt() - 1;
            int count = map.getOrDefault(val, 0);
            map.put(val, ++count);
        } int val = scanner.nextInt() - 1; val scanner.nextInt() - 1 scanner.nextInt() scanner.nextInt scanner 1 int count = map.getOrDefault(val, 0); count map.getOrDefault(val, 0) map.getOrDefault map val 0 map.put(val, ++count) map.put map val ++count count for (int i = 0; i < n; i++) {
            System.out.println(map.getOrDefault(i, 0));
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            System.out.println(map.getOrDefault(i, 0));
        } {
            System.out.println(map.getOrDefault(i, 0));
        } System.out.println(map.getOrDefault(i, 0)) System.out.println System.out System System.out map.getOrDefault(i, 0) map.getOrDefault map i 0 String args[] args public class Main {
    public static void main(String args[]) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        Map<Integer, Integer> map = new HashMap<>();
        for (int i = 0; i < n-1; i++) {
            int val = scanner.nextInt() - 1;
            int count = map.getOrDefault(val, 0);
            map.put(val, ++count);
        }

        for (int i = 0; i < n; i++) {
            System.out.println(map.getOrDefault(i, 0));
        }
    }
} public class Main {
    public static void main(String args[]) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        Map<Integer, Integer> map = new HashMap<>();
        for (int i = 0; i < n-1; i++) {
            int val = scanner.nextInt() - 1;
            int count = map.getOrDefault(val, 0);
            map.put(val, ++count);
        }

        for (int i = 0; i < n; i++) {
            System.out.println(map.getOrDefault(i, 0));
        }
    }
} Main
import java.util.*;

public class Main {
    public static void main(String args[]) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        Map<Integer, Integer> map = new HashMap<>();
        for (int i = 0; i < n-1; i++) {
            int val = scanner.nextInt() - 1;
            int count = map.getOrDefault(val, 0);
            map.put(val, ++count);
        }

        for (int i = 0; i < n; i++) {
            System.out.println(map.getOrDefault(i, 0));
        }
    }
}