/*
If you want to aim high, aim high
Don't let that studying and grades consume you
Just live life young
******************************
If I'm the sun, you're the moon
Because when I go up, you go down
*******************************
I'm working for the day I will surpass you
https://www.a2oj.com/Ladder16.html
*/
import java.util.*;
import java.io.*;
import java.math.*;

   public class Main
   {
      public static void main(String omkar[]) throws Exception
      {
         BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));  
         StringTokenizer st = new StringTokenizer(infile.readLine());
         int N = Integer.parseInt(st.nextToken());
         int[] arr = new int[N-1];
         st = new StringTokenizer(infile.readLine());
         for(int i=0; i < N-1; i++)
            arr[i] = Integer.parseInt(st.nextToken());
         int[] cnt = new int[N+5];
         for(int x: arr)
            cnt[x]++;
         int ans = N;
         for(int i=1; i <= N; i++)
         {
            ans = cnt[i];
            System.out.println(ans);
         }
      }
   } import java.util.*; util.* java import java.io.*; io.* java import java.math.*; math.* java public class Main
   {
      public static void main(String omkar[]) throws Exception
      {
         BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));  
         StringTokenizer st = new StringTokenizer(infile.readLine());
         int N = Integer.parseInt(st.nextToken());
         int[] arr = new int[N-1];
         st = new StringTokenizer(infile.readLine());
         for(int i=0; i < N-1; i++)
            arr[i] = Integer.parseInt(st.nextToken());
         int[] cnt = new int[N+5];
         for(int x: arr)
            cnt[x]++;
         int ans = N;
         for(int i=1; i <= N; i++)
         {
            ans = cnt[i];
            System.out.println(ans);
         }
      }
   } Main public static void main(String omkar[]) throws Exception
      {
         BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));  
         StringTokenizer st = new StringTokenizer(infile.readLine());
         int N = Integer.parseInt(st.nextToken());
         int[] arr = new int[N-1];
         st = new StringTokenizer(infile.readLine());
         for(int i=0; i < N-1; i++)
            arr[i] = Integer.parseInt(st.nextToken());
         int[] cnt = new int[N+5];
         for(int x: arr)
            cnt[x]++;
         int ans = N;
         for(int i=1; i <= N; i++)
         {
            ans = cnt[i];
            System.out.println(ans);
         }
      } main {
         BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));  
         StringTokenizer st = new StringTokenizer(infile.readLine());
         int N = Integer.parseInt(st.nextToken());
         int[] arr = new int[N-1];
         st = new StringTokenizer(infile.readLine());
         for(int i=0; i < N-1; i++)
            arr[i] = Integer.parseInt(st.nextToken());
         int[] cnt = new int[N+5];
         for(int x: arr)
            cnt[x]++;
         int ans = N;
         for(int i=1; i <= N; i++)
         {
            ans = cnt[i];
            System.out.println(ans);
         }
      } BufferedReader infile = new BufferedReader(new InputStreamReader(System.in)); infile new BufferedReader(new InputStreamReader(System.in)) StringTokenizer st = new StringTokenizer(infile.readLine()); st new StringTokenizer(infile.readLine()) int N = Integer.parseInt(st.nextToken()); N Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st int[] arr = new int[N-1]; arr new int[N-1] N-1 N 1 st = new StringTokenizer(infile.readLine()) st new StringTokenizer(infile.readLine()) for(int i=0; i < N-1; i++)
            arr[i] = Integer.parseInt(st.nextToken()); int i=0; int i=0; i 0 i < N-1 i N-1 N 1 i++ i++ i arr[i] = Integer.parseInt(st.nextToken()); arr[i] = Integer.parseInt(st.nextToken()) arr[i] arr i Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st int[] cnt = new int[N+5]; cnt new int[N+5] N+5 N 5 for(int x: arr)
            cnt[x]++; int x arr cnt[x]++; cnt[x]++ cnt[x] cnt x int ans = N; ans N for(int i=1; i <= N; i++)
         {
            ans = cnt[i];
            System.out.println(ans);
         } int i=1; int i=1; i 1 i <= N i N i++ i++ i {
            ans = cnt[i];
            System.out.println(ans);
         } {
            ans = cnt[i];
            System.out.println(ans);
         } ans = cnt[i] ans cnt[i] cnt i System.out.println(ans) System.out.println System.out System System.out ans String omkar[] omkar public class Main
   {
      public static void main(String omkar[]) throws Exception
      {
         BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));  
         StringTokenizer st = new StringTokenizer(infile.readLine());
         int N = Integer.parseInt(st.nextToken());
         int[] arr = new int[N-1];
         st = new StringTokenizer(infile.readLine());
         for(int i=0; i < N-1; i++)
            arr[i] = Integer.parseInt(st.nextToken());
         int[] cnt = new int[N+5];
         for(int x: arr)
            cnt[x]++;
         int ans = N;
         for(int i=1; i <= N; i++)
         {
            ans = cnt[i];
            System.out.println(ans);
         }
      }
   } public class Main
   {
      public static void main(String omkar[]) throws Exception
      {
         BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));  
         StringTokenizer st = new StringTokenizer(infile.readLine());
         int N = Integer.parseInt(st.nextToken());
         int[] arr = new int[N-1];
         st = new StringTokenizer(infile.readLine());
         for(int i=0; i < N-1; i++)
            arr[i] = Integer.parseInt(st.nextToken());
         int[] cnt = new int[N+5];
         for(int x: arr)
            cnt[x]++;
         int ans = N;
         for(int i=1; i <= N; i++)
         {
            ans = cnt[i];
            System.out.println(ans);
         }
      }
   } Main
/*
If you want to aim high, aim high
Don't let that studying and grades consume you
Just live life young
******************************
If I'm the sun, you're the moon
Because when I go up, you go down
*******************************
I'm working for the day I will surpass you
https://www.a2oj.com/Ladder16.html
*/
import java.util.*;
import java.io.*;
import java.math.*;

   public class Main
   {
      public static void main(String omkar[]) throws Exception
      {
         BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));  
         StringTokenizer st = new StringTokenizer(infile.readLine());
         int N = Integer.parseInt(st.nextToken());
         int[] arr = new int[N-1];
         st = new StringTokenizer(infile.readLine());
         for(int i=0; i < N-1; i++)
            arr[i] = Integer.parseInt(st.nextToken());
         int[] cnt = new int[N+5];
         for(int x: arr)
            cnt[x]++;
         int ans = N;
         for(int i=1; i <= N; i++)
         {
            ans = cnt[i];
            System.out.println(ans);
         }
      }
   }