import java.util.Scanner;
public class Main{
    public static void main(String[] args){
        Scanner scn = new Scanner(System.in);
        int N = scn.nextInt();
        String[] Am = (scn.nextLine()).split(" ");
        Am = (scn.nextLine()).split(" ");
        int[] Aresult = new int[N];
        int A = 0;
        for(int i=0;i<N-1;i++){
            A = Integer.valueOf(Am[i])-1;
            Aresult[A] = Aresult[A] + 1;
        }
        for(int i=0;i<N;i++){
            System.out.println(Aresult[i]);
        }
    }
} import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String[] args){
        Scanner scn = new Scanner(System.in);
        int N = scn.nextInt();
        String[] Am = (scn.nextLine()).split(" ");
        Am = (scn.nextLine()).split(" ");
        int[] Aresult = new int[N];
        int A = 0;
        for(int i=0;i<N-1;i++){
            A = Integer.valueOf(Am[i])-1;
            Aresult[A] = Aresult[A] + 1;
        }
        for(int i=0;i<N;i++){
            System.out.println(Aresult[i]);
        }
    }
} Main public static void main(String[] args){
        Scanner scn = new Scanner(System.in);
        int N = scn.nextInt();
        String[] Am = (scn.nextLine()).split(" ");
        Am = (scn.nextLine()).split(" ");
        int[] Aresult = new int[N];
        int A = 0;
        for(int i=0;i<N-1;i++){
            A = Integer.valueOf(Am[i])-1;
            Aresult[A] = Aresult[A] + 1;
        }
        for(int i=0;i<N;i++){
            System.out.println(Aresult[i]);
        }
    } main {
        Scanner scn = new Scanner(System.in);
        int N = scn.nextInt();
        String[] Am = (scn.nextLine()).split(" ");
        Am = (scn.nextLine()).split(" ");
        int[] Aresult = new int[N];
        int A = 0;
        for(int i=0;i<N-1;i++){
            A = Integer.valueOf(Am[i])-1;
            Aresult[A] = Aresult[A] + 1;
        }
        for(int i=0;i<N;i++){
            System.out.println(Aresult[i]);
        }
    } Scanner scn = new Scanner(System.in); scn new Scanner(System.in) int N = scn.nextInt(); N scn.nextInt() scn.nextInt scn String[] Am = (scn.nextLine()).split(" "); Am (scn.nextLine()).split(" ") (scn.nextLine()).split (scn.nextLine()) scn.nextLine scn " " Am = (scn.nextLine()).split(" ") Am (scn.nextLine()).split(" ") (scn.nextLine()).split (scn.nextLine()) scn.nextLine scn " " int[] Aresult = new int[N]; Aresult new int[N] N int A = 0; A 0 for(int i=0;i<N-1;i++){
            A = Integer.valueOf(Am[i])-1;
            Aresult[A] = Aresult[A] + 1;
        } int i=0; int i=0; i 0 i<N-1 i N-1 N 1 i++ i++ i {
            A = Integer.valueOf(Am[i])-1;
            Aresult[A] = Aresult[A] + 1;
        } {
            A = Integer.valueOf(Am[i])-1;
            Aresult[A] = Aresult[A] + 1;
        } A = Integer.valueOf(Am[i])-1 A Integer.valueOf(Am[i])-1 Integer.valueOf(Am[i]) Integer.valueOf Integer Am[i] Am i 1 Aresult[A] = Aresult[A] + 1 Aresult[A] Aresult A Aresult[A] + 1 Aresult[A] Aresult A 1 for(int i=0;i<N;i++){
            System.out.println(Aresult[i]);
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
            System.out.println(Aresult[i]);
        } {
            System.out.println(Aresult[i]);
        } System.out.println(Aresult[i]) System.out.println System.out System System.out Aresult[i] Aresult i String[] args args public class Main{
    public static void main(String[] args){
        Scanner scn = new Scanner(System.in);
        int N = scn.nextInt();
        String[] Am = (scn.nextLine()).split(" ");
        Am = (scn.nextLine()).split(" ");
        int[] Aresult = new int[N];
        int A = 0;
        for(int i=0;i<N-1;i++){
            A = Integer.valueOf(Am[i])-1;
            Aresult[A] = Aresult[A] + 1;
        }
        for(int i=0;i<N;i++){
            System.out.println(Aresult[i]);
        }
    }
} public class Main{
    public static void main(String[] args){
        Scanner scn = new Scanner(System.in);
        int N = scn.nextInt();
        String[] Am = (scn.nextLine()).split(" ");
        Am = (scn.nextLine()).split(" ");
        int[] Aresult = new int[N];
        int A = 0;
        for(int i=0;i<N-1;i++){
            A = Integer.valueOf(Am[i])-1;
            Aresult[A] = Aresult[A] + 1;
        }
        for(int i=0;i<N;i++){
            System.out.println(Aresult[i]);
        }
    }
} Main
import java.util.Scanner;
public class Main{
    public static void main(String[] args){
        Scanner scn = new Scanner(System.in);
        int N = scn.nextInt();
        String[] Am = (scn.nextLine()).split(" ");
        Am = (scn.nextLine()).split(" ");
        int[] Aresult = new int[N];
        int A = 0;
        for(int i=0;i<N-1;i++){
            A = Integer.valueOf(Am[i])-1;
            Aresult[A] = Aresult[A] + 1;
        }
        for(int i=0;i<N;i++){
            System.out.println(Aresult[i]);
        }
    }
}