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

    int n = sc.nextInt();
    HashMap<Integer, Integer> hashmap = new HashMap<Integer, Integer>();

    hashmap.put(0, 0);
    for (int i = 1; i < n; i++) {
      hashmap.put(i, 0);
    }
    for (int i = 1; i < n; i++) {
      int a = sc.nextInt() - 1;
      int old = hashmap.get(a);
      hashmap.replace(a, old + 1);
    }
    for (int i = 0; i < n; i++) {
      System.out.println(hashmap.get(i));
    }

    sc.close();

  }
} import java.util.*; util.* java public class Main {
  public static void main(String args[]) {
    Scanner sc = new Scanner(System.in);

    int n = sc.nextInt();
    HashMap<Integer, Integer> hashmap = new HashMap<Integer, Integer>();

    hashmap.put(0, 0);
    for (int i = 1; i < n; i++) {
      hashmap.put(i, 0);
    }
    for (int i = 1; i < n; i++) {
      int a = sc.nextInt() - 1;
      int old = hashmap.get(a);
      hashmap.replace(a, old + 1);
    }
    for (int i = 0; i < n; i++) {
      System.out.println(hashmap.get(i));
    }

    sc.close();

  }
} Main public static void main(String args[]) {
    Scanner sc = new Scanner(System.in);

    int n = sc.nextInt();
    HashMap<Integer, Integer> hashmap = new HashMap<Integer, Integer>();

    hashmap.put(0, 0);
    for (int i = 1; i < n; i++) {
      hashmap.put(i, 0);
    }
    for (int i = 1; i < n; i++) {
      int a = sc.nextInt() - 1;
      int old = hashmap.get(a);
      hashmap.replace(a, old + 1);
    }
    for (int i = 0; i < n; i++) {
      System.out.println(hashmap.get(i));
    }

    sc.close();

  } main {
    Scanner sc = new Scanner(System.in);

    int n = sc.nextInt();
    HashMap<Integer, Integer> hashmap = new HashMap<Integer, Integer>();

    hashmap.put(0, 0);
    for (int i = 1; i < n; i++) {
      hashmap.put(i, 0);
    }
    for (int i = 1; i < n; i++) {
      int a = sc.nextInt() - 1;
      int old = hashmap.get(a);
      hashmap.replace(a, old + 1);
    }
    for (int i = 0; i < n; i++) {
      System.out.println(hashmap.get(i));
    }

    sc.close();

  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc HashMap<Integer, Integer> hashmap = new HashMap<Integer, Integer>(); hashmap new HashMap<Integer, Integer>() hashmap.put(0, 0) hashmap.put hashmap 0 0 for (int i = 1; i < n; i++) {
      hashmap.put(i, 0);
    } int i = 1; int i = 1; i 1 i < n i n i++ i++ i {
      hashmap.put(i, 0);
    } {
      hashmap.put(i, 0);
    } hashmap.put(i, 0) hashmap.put hashmap i 0 for (int i = 1; i < n; i++) {
      int a = sc.nextInt() - 1;
      int old = hashmap.get(a);
      hashmap.replace(a, old + 1);
    } int i = 1; int i = 1; i 1 i < n i n i++ i++ i {
      int a = sc.nextInt() - 1;
      int old = hashmap.get(a);
      hashmap.replace(a, old + 1);
    } {
      int a = sc.nextInt() - 1;
      int old = hashmap.get(a);
      hashmap.replace(a, old + 1);
    } int a = sc.nextInt() - 1; a sc.nextInt() - 1 sc.nextInt() sc.nextInt sc 1 int old = hashmap.get(a); old hashmap.get(a) hashmap.get hashmap a hashmap.replace(a, old + 1) hashmap.replace hashmap a old + 1 old 1 for (int i = 0; i < n; i++) {
      System.out.println(hashmap.get(i));
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      System.out.println(hashmap.get(i));
    } {
      System.out.println(hashmap.get(i));
    } System.out.println(hashmap.get(i)) System.out.println System.out System System.out hashmap.get(i) hashmap.get hashmap i sc.close() sc.close sc String args[] args public class Main {
  public static void main(String args[]) {
    Scanner sc = new Scanner(System.in);

    int n = sc.nextInt();
    HashMap<Integer, Integer> hashmap = new HashMap<Integer, Integer>();

    hashmap.put(0, 0);
    for (int i = 1; i < n; i++) {
      hashmap.put(i, 0);
    }
    for (int i = 1; i < n; i++) {
      int a = sc.nextInt() - 1;
      int old = hashmap.get(a);
      hashmap.replace(a, old + 1);
    }
    for (int i = 0; i < n; i++) {
      System.out.println(hashmap.get(i));
    }

    sc.close();

  }
} public class Main {
  public static void main(String args[]) {
    Scanner sc = new Scanner(System.in);

    int n = sc.nextInt();
    HashMap<Integer, Integer> hashmap = new HashMap<Integer, Integer>();

    hashmap.put(0, 0);
    for (int i = 1; i < n; i++) {
      hashmap.put(i, 0);
    }
    for (int i = 1; i < n; i++) {
      int a = sc.nextInt() - 1;
      int old = hashmap.get(a);
      hashmap.replace(a, old + 1);
    }
    for (int i = 0; i < n; i++) {
      System.out.println(hashmap.get(i));
    }

    sc.close();

  }
} Main
import java.util.*;
public class Main {
  public static void main(String args[]) {
    Scanner sc = new Scanner(System.in);

    int n = sc.nextInt();
    HashMap<Integer, Integer> hashmap = new HashMap<Integer, Integer>();

    hashmap.put(0, 0);
    for (int i = 1; i < n; i++) {
      hashmap.put(i, 0);
    }
    for (int i = 1; i < n; i++) {
      int a = sc.nextInt() - 1;
      int old = hashmap.get(a);
      hashmap.replace(a, old + 1);
    }
    for (int i = 0; i < n; i++) {
      System.out.println(hashmap.get(i));
    }

    sc.close();

  }
}