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

            ArrayList<Integer> list = new ArrayList<>(n);

            for(int j = 0; j < n; j++)list.add(0);

            for(int i = 0; i < n - 1; i++){
                int joshi = Integer.parseInt(sc.next());
                list.set(joshi - 1, list.get(joshi - 1) + 1);
            }

            for(int k: list){
                System.out.println(k);
            }

        }catch(Exception e){
            e.printStackTrace();
        }        
    }
} import java.util.*; util.* java class Main{
    public static void main(String[] args) {
        
        try(Scanner sc = new Scanner(System.in)){
            int n = Integer.parseInt(sc.next());

            ArrayList<Integer> list = new ArrayList<>(n);

            for(int j = 0; j < n; j++)list.add(0);

            for(int i = 0; i < n - 1; i++){
                int joshi = Integer.parseInt(sc.next());
                list.set(joshi - 1, list.get(joshi - 1) + 1);
            }

            for(int k: list){
                System.out.println(k);
            }

        }catch(Exception e){
            e.printStackTrace();
        }        
    }
} Main public static void main(String[] args) {
        
        try(Scanner sc = new Scanner(System.in)){
            int n = Integer.parseInt(sc.next());

            ArrayList<Integer> list = new ArrayList<>(n);

            for(int j = 0; j < n; j++)list.add(0);

            for(int i = 0; i < n - 1; i++){
                int joshi = Integer.parseInt(sc.next());
                list.set(joshi - 1, list.get(joshi - 1) + 1);
            }

            for(int k: list){
                System.out.println(k);
            }

        }catch(Exception e){
            e.printStackTrace();
        }        
    } main {
        
        try(Scanner sc = new Scanner(System.in)){
            int n = Integer.parseInt(sc.next());

            ArrayList<Integer> list = new ArrayList<>(n);

            for(int j = 0; j < n; j++)list.add(0);

            for(int i = 0; i < n - 1; i++){
                int joshi = Integer.parseInt(sc.next());
                list.set(joshi - 1, list.get(joshi - 1) + 1);
            }

            for(int k: list){
                System.out.println(k);
            }

        }catch(Exception e){
            e.printStackTrace();
        }        
    } try(Scanner sc = new Scanner(System.in)){
            int n = Integer.parseInt(sc.next());

            ArrayList<Integer> list = new ArrayList<>(n);

            for(int j = 0; j < n; j++)list.add(0);

            for(int i = 0; i < n - 1; i++){
                int joshi = Integer.parseInt(sc.next());
                list.set(joshi - 1, list.get(joshi - 1) + 1);
            }

            for(int k: list){
                System.out.println(k);
            }

        }catch(Exception e){
            e.printStackTrace();
        } catch(Exception e){
            e.printStackTrace();
        } Exception e {
            e.printStackTrace();
        } e.printStackTrace() e.printStackTrace e {
            int n = Integer.parseInt(sc.next());

            ArrayList<Integer> list = new ArrayList<>(n);

            for(int j = 0; j < n; j++)list.add(0);

            for(int i = 0; i < n - 1; i++){
                int joshi = Integer.parseInt(sc.next());
                list.set(joshi - 1, list.get(joshi - 1) + 1);
            }

            for(int k: list){
                System.out.println(k);
            }

        } Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc ArrayList<Integer> list = new ArrayList<>(n); list new ArrayList<>(n) for(int j = 0; j < n; j++)list.add(0); int j = 0; int j = 0; j 0 j < n j n j++ j++ j list.add(0); list.add(0) list.add list 0 for(int i = 0; i < n - 1; i++){
                int joshi = Integer.parseInt(sc.next());
                list.set(joshi - 1, list.get(joshi - 1) + 1);
            } int i = 0; int i = 0; i 0 i < n - 1 i n - 1 n 1 i++ i++ i {
                int joshi = Integer.parseInt(sc.next());
                list.set(joshi - 1, list.get(joshi - 1) + 1);
            } {
                int joshi = Integer.parseInt(sc.next());
                list.set(joshi - 1, list.get(joshi - 1) + 1);
            } int joshi = Integer.parseInt(sc.next()); joshi Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc list.set(joshi - 1, list.get(joshi - 1) + 1) list.set list joshi - 1 joshi 1 list.get(joshi - 1) + 1 list.get(joshi - 1) list.get list joshi - 1 joshi 1 1 for(int k: list){
                System.out.println(k);
            } int k list {
                System.out.println(k);
            } {
                System.out.println(k);
            } System.out.println(k) System.out.println System.out System System.out k String[] args args
import java.util.*;
     
class Main{
    public static void main(String[] args) {
        
        try(Scanner sc = new Scanner(System.in)){
            int n = Integer.parseInt(sc.next());

            ArrayList<Integer> list = new ArrayList<>(n);

            for(int j = 0; j < n; j++)list.add(0);

            for(int i = 0; i < n - 1; i++){
                int joshi = Integer.parseInt(sc.next());
                list.set(joshi - 1, list.get(joshi - 1) + 1);
            }

            for(int k: list){
                System.out.println(k);
            }

        }catch(Exception e){
            e.printStackTrace();
        }        
    }
}