
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {

        Scanner scan =new Scanner(System.in);

        int N= scan.nextInt();
        int A[] = new int[N];
int B[]=new int[N];

int i2=0;

while (i2<N)
{A[i2]=0;
i2=i2+1;
}
int i1=1;

 while(i1<N){
     B[i1]=scan.nextInt()-1;
     i1=i1+1;

 }
        int i=1;
        while (i<N) { A[B[i]]=A[B[i]]+1;
        i=i+1;


        }
int i3=0;
while (i3<N){System.out.println(A[i3]);
i3=i3+1;

}


    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {

        Scanner scan =new Scanner(System.in);

        int N= scan.nextInt();
        int A[] = new int[N];
int B[]=new int[N];

int i2=0;

while (i2<N)
{A[i2]=0;
i2=i2+1;
}
int i1=1;

 while(i1<N){
     B[i1]=scan.nextInt()-1;
     i1=i1+1;

 }
        int i=1;
        while (i<N) { A[B[i]]=A[B[i]]+1;
        i=i+1;


        }
int i3=0;
while (i3<N){System.out.println(A[i3]);
i3=i3+1;

}


    }
} Main public static void main(String[] args) {

        Scanner scan =new Scanner(System.in);

        int N= scan.nextInt();
        int A[] = new int[N];
int B[]=new int[N];

int i2=0;

while (i2<N)
{A[i2]=0;
i2=i2+1;
}
int i1=1;

 while(i1<N){
     B[i1]=scan.nextInt()-1;
     i1=i1+1;

 }
        int i=1;
        while (i<N) { A[B[i]]=A[B[i]]+1;
        i=i+1;


        }
int i3=0;
while (i3<N){System.out.println(A[i3]);
i3=i3+1;

}


    } main {

        Scanner scan =new Scanner(System.in);

        int N= scan.nextInt();
        int A[] = new int[N];
int B[]=new int[N];

int i2=0;

while (i2<N)
{A[i2]=0;
i2=i2+1;
}
int i1=1;

 while(i1<N){
     B[i1]=scan.nextInt()-1;
     i1=i1+1;

 }
        int i=1;
        while (i<N) { A[B[i]]=A[B[i]]+1;
        i=i+1;


        }
int i3=0;
while (i3<N){System.out.println(A[i3]);
i3=i3+1;

}


    } Scanner scan =new Scanner(System.in); scan new Scanner(System.in) int N= scan.nextInt(); N scan.nextInt() scan.nextInt scan int A[] = new int[N]; A new int[N] N int B[]=new int[N]; B new int[N] N int i2=0; i2 0 while (i2<N)
{A[i2]=0;
i2=i2+1;
} i2<N i2 N {A[i2]=0;
i2=i2+1;
} A[i2]=0 A[i2] A i2 0 i2=i2+1 i2 i2+1 i2 1 int i1=1; i1 1 while(i1<N){
     B[i1]=scan.nextInt()-1;
     i1=i1+1;

 } i1<N i1 N {
     B[i1]=scan.nextInt()-1;
     i1=i1+1;

 } B[i1]=scan.nextInt()-1 B[i1] B i1 scan.nextInt()-1 scan.nextInt() scan.nextInt scan 1 i1=i1+1 i1 i1+1 i1 1 int i=1; i 1 while (i<N) { A[B[i]]=A[B[i]]+1;
        i=i+1;


        } i<N i N { A[B[i]]=A[B[i]]+1;
        i=i+1;


        } A[B[i]]=A[B[i]]+1 A[B[i]] A B[i] B i A[B[i]]+1 A[B[i]] A B[i] B i 1 i=i+1 i i+1 i 1 int i3=0; i3 0 while (i3<N){System.out.println(A[i3]);
i3=i3+1;

} i3<N i3 N {System.out.println(A[i3]);
i3=i3+1;

} System.out.println(A[i3]) System.out.println System.out System System.out A[i3] A i3 i3=i3+1 i3 i3+1 i3 1 String[] args args public class Main {
    public static void main(String[] args) {

        Scanner scan =new Scanner(System.in);

        int N= scan.nextInt();
        int A[] = new int[N];
int B[]=new int[N];

int i2=0;

while (i2<N)
{A[i2]=0;
i2=i2+1;
}
int i1=1;

 while(i1<N){
     B[i1]=scan.nextInt()-1;
     i1=i1+1;

 }
        int i=1;
        while (i<N) { A[B[i]]=A[B[i]]+1;
        i=i+1;


        }
int i3=0;
while (i3<N){System.out.println(A[i3]);
i3=i3+1;

}


    }
} public class Main {
    public static void main(String[] args) {

        Scanner scan =new Scanner(System.in);

        int N= scan.nextInt();
        int A[] = new int[N];
int B[]=new int[N];

int i2=0;

while (i2<N)
{A[i2]=0;
i2=i2+1;
}
int i1=1;

 while(i1<N){
     B[i1]=scan.nextInt()-1;
     i1=i1+1;

 }
        int i=1;
        while (i<N) { A[B[i]]=A[B[i]]+1;
        i=i+1;


        }
int i3=0;
while (i3<N){System.out.println(A[i3]);
i3=i3+1;

}


    }
} Main

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {

        Scanner scan =new Scanner(System.in);

        int N= scan.nextInt();
        int A[] = new int[N];
int B[]=new int[N];

int i2=0;

while (i2<N)
{A[i2]=0;
i2=i2+1;
}
int i1=1;

 while(i1<N){
     B[i1]=scan.nextInt()-1;
     i1=i1+1;

 }
        int i=1;
        while (i<N) { A[B[i]]=A[B[i]]+1;
        i=i+1;


        }
int i3=0;
while (i3<N){System.out.println(A[i3]);
i3=i3+1;

}


    }
}