import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {

  public static void main(String[] args) throws Exception {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(br.readLine());
    String[] line = br.readLine().split(" ");
    int[] relation = new int[n];
    int[] answer = new int[n];
    for(int i = 0; i < line.length; i++){
      int boss = Integer.parseInt(line[i]) - 1;
      relation[i + 1] = boss;
    }
    for(int i = n - 1; i > 0; i--){
      answer[relation[i]]++;
    }
    for(int a : answer){
      System.out.println(a);
    }
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

  public static void main(String[] args) throws Exception {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(br.readLine());
    String[] line = br.readLine().split(" ");
    int[] relation = new int[n];
    int[] answer = new int[n];
    for(int i = 0; i < line.length; i++){
      int boss = Integer.parseInt(line[i]) - 1;
      relation[i + 1] = boss;
    }
    for(int i = n - 1; i > 0; i--){
      answer[relation[i]]++;
    }
    for(int a : answer){
      System.out.println(a);
    }
  }
} Main public static void main(String[] args) throws Exception {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(br.readLine());
    String[] line = br.readLine().split(" ");
    int[] relation = new int[n];
    int[] answer = new int[n];
    for(int i = 0; i < line.length; i++){
      int boss = Integer.parseInt(line[i]) - 1;
      relation[i + 1] = boss;
    }
    for(int i = n - 1; i > 0; i--){
      answer[relation[i]]++;
    }
    for(int a : answer){
      System.out.println(a);
    }
  } main {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(br.readLine());
    String[] line = br.readLine().split(" ");
    int[] relation = new int[n];
    int[] answer = new int[n];
    for(int i = 0; i < line.length; i++){
      int boss = Integer.parseInt(line[i]) - 1;
      relation[i + 1] = boss;
    }
    for(int i = n - 1; i > 0; i--){
      answer[relation[i]]++;
    }
    for(int a : answer){
      System.out.println(a);
    }
  } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int n = Integer.parseInt(br.readLine()); n Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br String[] line = br.readLine().split(" "); line br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int[] relation = new int[n]; relation new int[n] n int[] answer = new int[n]; answer new int[n] n for(int i = 0; i < line.length; i++){
      int boss = Integer.parseInt(line[i]) - 1;
      relation[i + 1] = boss;
    } int i = 0; int i = 0; i 0 i < line.length i line.length line line.length i++ i++ i {
      int boss = Integer.parseInt(line[i]) - 1;
      relation[i + 1] = boss;
    } {
      int boss = Integer.parseInt(line[i]) - 1;
      relation[i + 1] = boss;
    } int boss = Integer.parseInt(line[i]) - 1; boss Integer.parseInt(line[i]) - 1 Integer.parseInt(line[i]) Integer.parseInt Integer line[i] line i 1 relation[i + 1] = boss relation[i + 1] relation i + 1 i 1 boss for(int i = n - 1; i > 0; i--){
      answer[relation[i]]++;
    } int i = n - 1; int i = n - 1; i n - 1 n 1 i > 0 i 0 i-- i-- i {
      answer[relation[i]]++;
    } {
      answer[relation[i]]++;
    } answer[relation[i]]++ answer[relation[i]] answer relation[i] relation i for(int a : answer){
      System.out.println(a);
    } int a answer {
      System.out.println(a);
    } {
      System.out.println(a);
    } System.out.println(a) System.out.println System.out System System.out a String[] args args public class Main {

  public static void main(String[] args) throws Exception {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(br.readLine());
    String[] line = br.readLine().split(" ");
    int[] relation = new int[n];
    int[] answer = new int[n];
    for(int i = 0; i < line.length; i++){
      int boss = Integer.parseInt(line[i]) - 1;
      relation[i + 1] = boss;
    }
    for(int i = n - 1; i > 0; i--){
      answer[relation[i]]++;
    }
    for(int a : answer){
      System.out.println(a);
    }
  }
} public class Main {

  public static void main(String[] args) throws Exception {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(br.readLine());
    String[] line = br.readLine().split(" ");
    int[] relation = new int[n];
    int[] answer = new int[n];
    for(int i = 0; i < line.length; i++){
      int boss = Integer.parseInt(line[i]) - 1;
      relation[i + 1] = boss;
    }
    for(int i = n - 1; i > 0; i--){
      answer[relation[i]]++;
    }
    for(int a : answer){
      System.out.println(a);
    }
  }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {

  public static void main(String[] args) throws Exception {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(br.readLine());
    String[] line = br.readLine().split(" ");
    int[] relation = new int[n];
    int[] answer = new int[n];
    for(int i = 0; i < line.length; i++){
      int boss = Integer.parseInt(line[i]) - 1;
      relation[i + 1] = boss;
    }
    for(int i = n - 1; i > 0; i--){
      answer[relation[i]]++;
    }
    for(int a : answer){
      System.out.println(a);
    }
  }
}