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[] A = new int[N - 1];
    int[] B = new int[N];
    for (int i = 0; i < N; i++) {
      B[i] = 0;
    }
    for (int i = 0; i < N -1; i++) {
      int tmp = Integer.parseInt(sc.next()) -1;
      B[tmp] = B[tmp] +1;
    }
    for (int i = 0; i < N; i++) {
      System.out.println(B[i]);
    }

  }
}
 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[] A = new int[N - 1];
    int[] B = new int[N];
    for (int i = 0; i < N; i++) {
      B[i] = 0;
    }
    for (int i = 0; i < N -1; i++) {
      int tmp = Integer.parseInt(sc.next()) -1;
      B[tmp] = B[tmp] +1;
    }
    for (int i = 0; i < N; i++) {
      System.out.println(B[i]);
    }

  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = Integer.parseInt(sc.next());
    // int[] A = new int[N - 1];
    int[] B = new int[N];
    for (int i = 0; i < N; i++) {
      B[i] = 0;
    }
    for (int i = 0; i < N -1; i++) {
      int tmp = Integer.parseInt(sc.next()) -1;
      B[tmp] = B[tmp] +1;
    }
    for (int i = 0; i < N; i++) {
      System.out.println(B[i]);
    }

  } main {
    Scanner sc = new Scanner(System.in);
    int N = Integer.parseInt(sc.next());
    // int[] A = new int[N - 1];
    int[] B = new int[N];
    for (int i = 0; i < N; i++) {
      B[i] = 0;
    }
    for (int i = 0; i < N -1; i++) {
      int tmp = Integer.parseInt(sc.next()) -1;
      B[tmp] = B[tmp] +1;
    }
    for (int i = 0; i < N; i++) {
      System.out.println(B[i]);
    }

  } 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]; B new int[N] N for (int i = 0; i < N; i++) {
      B[i] = 0;
    } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
      B[i] = 0;
    } {
      B[i] = 0;
    } B[i] = 0 B[i] B i 0 for (int i = 0; i < N -1; i++) {
      int tmp = Integer.parseInt(sc.next()) -1;
      B[tmp] = B[tmp] +1;
    } int i = 0; int i = 0; i 0 i < N -1 i N -1 N 1 i++ i++ i {
      int tmp = Integer.parseInt(sc.next()) -1;
      B[tmp] = B[tmp] +1;
    } {
      int tmp = Integer.parseInt(sc.next()) -1;
      B[tmp] = B[tmp] +1;
    } int tmp = Integer.parseInt(sc.next()) -1; tmp Integer.parseInt(sc.next()) -1 Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc 1 B[tmp] = B[tmp] +1 B[tmp] B tmp B[tmp] +1 B[tmp] B tmp 1 for (int i = 0; i < N; i++) {
      System.out.println(B[i]);
    } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
      System.out.println(B[i]);
    } {
      System.out.println(B[i]);
    } System.out.println(B[i]) System.out.println System.out System System.out B[i] B i 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[] A = new int[N - 1];
    int[] B = new int[N];
    for (int i = 0; i < N; i++) {
      B[i] = 0;
    }
    for (int i = 0; i < N -1; i++) {
      int tmp = Integer.parseInt(sc.next()) -1;
      B[tmp] = B[tmp] +1;
    }
    for (int i = 0; i < N; i++) {
      System.out.println(B[i]);
    }

  }
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = Integer.parseInt(sc.next());
    // int[] A = new int[N - 1];
    int[] B = new int[N];
    for (int i = 0; i < N; i++) {
      B[i] = 0;
    }
    for (int i = 0; i < N -1; i++) {
      int tmp = Integer.parseInt(sc.next()) -1;
      B[tmp] = B[tmp] +1;
    }
    for (int i = 0; i < N; i++) {
      System.out.println(B[i]);
    }

  }
} 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[] A = new int[N - 1];
    int[] B = new int[N];
    for (int i = 0; i < N; i++) {
      B[i] = 0;
    }
    for (int i = 0; i < N -1; i++) {
      int tmp = Integer.parseInt(sc.next()) -1;
      B[tmp] = B[tmp] +1;
    }
    for (int i = 0; i < N; i++) {
      System.out.println(B[i]);
    }

  }
}

