import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        
        Scanner sc = new Scanner(System.in);
        
        int n = Integer.parseInt(sc.next());
        int[] b = new int[n+1];
        for(int i = 2; i <= n; i++){
            int a = Integer.parseInt(sc.next());
            b[a]++;
        }
        
        StringBuilder sb = new StringBuilder();
        for(int i = 1; i <= n; i++){
            sb.append(b[i]).append(System.lineSeparator());
        }
        System.out.print(sb);
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        
        Scanner sc = new Scanner(System.in);
        
        int n = Integer.parseInt(sc.next());
        int[] b = new int[n+1];
        for(int i = 2; i <= n; i++){
            int a = Integer.parseInt(sc.next());
            b[a]++;
        }
        
        StringBuilder sb = new StringBuilder();
        for(int i = 1; i <= n; i++){
            sb.append(b[i]).append(System.lineSeparator());
        }
        System.out.print(sb);
    }
} Main public static void main(String[] args) {
        
        Scanner sc = new Scanner(System.in);
        
        int n = Integer.parseInt(sc.next());
        int[] b = new int[n+1];
        for(int i = 2; i <= n; i++){
            int a = Integer.parseInt(sc.next());
            b[a]++;
        }
        
        StringBuilder sb = new StringBuilder();
        for(int i = 1; i <= n; i++){
            sb.append(b[i]).append(System.lineSeparator());
        }
        System.out.print(sb);
    } main {
        
        Scanner sc = new Scanner(System.in);
        
        int n = Integer.parseInt(sc.next());
        int[] b = new int[n+1];
        for(int i = 2; i <= n; i++){
            int a = Integer.parseInt(sc.next());
            b[a]++;
        }
        
        StringBuilder sb = new StringBuilder();
        for(int i = 1; i <= n; i++){
            sb.append(b[i]).append(System.lineSeparator());
        }
        System.out.print(sb);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int[] b = new int[n+1]; b new int[n+1] n+1 n 1 for(int i = 2; i <= n; i++){
            int a = Integer.parseInt(sc.next());
            b[a]++;
        } int i = 2; int i = 2; i 2 i <= n i n i++ i++ i {
            int a = Integer.parseInt(sc.next());
            b[a]++;
        } {
            int a = Integer.parseInt(sc.next());
            b[a]++;
        } int a = Integer.parseInt(sc.next()); a Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc b[a]++ b[a] b a StringBuilder sb = new StringBuilder(); sb new StringBuilder() for(int i = 1; i <= n; i++){
            sb.append(b[i]).append(System.lineSeparator());
        } int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
            sb.append(b[i]).append(System.lineSeparator());
        } {
            sb.append(b[i]).append(System.lineSeparator());
        } sb.append(b[i]).append(System.lineSeparator()) sb.append(b[i]).append sb.append(b[i]) sb.append sb b[i] b i System.lineSeparator() System.lineSeparator System System.out.print(sb) System.out.print System.out System System.out sb String[] args args public class Main {

    public static void main(String[] args) {
        
        Scanner sc = new Scanner(System.in);
        
        int n = Integer.parseInt(sc.next());
        int[] b = new int[n+1];
        for(int i = 2; i <= n; i++){
            int a = Integer.parseInt(sc.next());
            b[a]++;
        }
        
        StringBuilder sb = new StringBuilder();
        for(int i = 1; i <= n; i++){
            sb.append(b[i]).append(System.lineSeparator());
        }
        System.out.print(sb);
    }
} public class Main {

    public static void main(String[] args) {
        
        Scanner sc = new Scanner(System.in);
        
        int n = Integer.parseInt(sc.next());
        int[] b = new int[n+1];
        for(int i = 2; i <= n; i++){
            int a = Integer.parseInt(sc.next());
            b[a]++;
        }
        
        StringBuilder sb = new StringBuilder();
        for(int i = 1; i <= n; i++){
            sb.append(b[i]).append(System.lineSeparator());
        }
        System.out.print(sb);
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        
        Scanner sc = new Scanner(System.in);
        
        int n = Integer.parseInt(sc.next());
        int[] b = new int[n+1];
        for(int i = 2; i <= n; i++){
            int a = Integer.parseInt(sc.next());
            b[a]++;
        }
        
        StringBuilder sb = new StringBuilder();
        for(int i = 1; i <= n; i++){
            sb.append(b[i]).append(System.lineSeparator());
        }
        System.out.print(sb);
    }
}