import javax.management.MBeanRegistration;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.lang.reflect.Array;
import java.util.StringTokenizer;
import java.util.Scanner;
import java.lang.*;
import java.io.*;
import java.util.*;
import java.lang.Integer;
import java.util.HashMap;

public class Main {
    // driver function to test the above functions
    public static void main(String args[]) throws IOException {

        Reader.init(System.in);
        int n=  Reader.nextInt();
       int[] arr = new int[n];

       boolean[] veri = new boolean[n];
        for (int i=0; i<n-1
                ; i++){
            int val = Reader.nextInt();
            if (veri[val-1]==false){
                arr[val-1] = 1;
                veri[val-1]= true;
            }
            else {
            arr[val-1] = arr[val-1]+1;
            }
        }

        for (int i=0; i<n; i++){
            int val=0;
            if (veri[i]==false){
                val=0;
            }
            else {
                val= arr[i];
            }

            System.out.println(val);
        }

    }
}

class Node{
    char val;
    Node nxt = null;
    Node prev=null;


}



class solu{
    int gcd(int a, int b)
    {
        if (a == 0)
            return b;
        return gcd(b % a, a);
    }

}

/** Class for buffered reading int and double values */
class Reader {
    static BufferedReader reader;
    static StringTokenizer tokenizer;

    /** call this method to initialize reader for InputStream */
    static void init(InputStream input) {
        reader = new BufferedReader(
                new InputStreamReader(input) );
        tokenizer = new StringTokenizer("");
    }

    /** get next word */
    static String next() throws IOException {
        while ( ! tokenizer.hasMoreTokens() ) {
            //TODO add check for eof if necessary
            tokenizer = new StringTokenizer(
                    reader.readLine() );
        }
        return tokenizer.nextToken();
    }

    static int nextInt() throws IOException {
        return Integer.parseInt( next() );
    }

    static long nextLong() throws IOException {
        return Long.parseLong( next() );
    }

    static double nextDouble() throws IOException {
        return Double.parseDouble( next() );
    }

    static String line() throws IOException {
        return reader.readLine();
    }
} import javax.management.MBeanRegistration; MBeanRegistration javax.management import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.InputStreamReader; InputStreamReader java.io import java.lang.reflect.Array; Array java.lang.reflect import java.util.StringTokenizer; StringTokenizer java.util import java.util.Scanner; Scanner java.util import java.lang.*; lang.* java import java.io.*; io.* java import java.util.*; util.* java import java.lang.Integer; Integer java.lang import java.util.HashMap; HashMap java.util public class Main {
    // driver function to test the above functions
    public static void main(String args[]) throws IOException {

        Reader.init(System.in);
        int n=  Reader.nextInt();
       int[] arr = new int[n];

       boolean[] veri = new boolean[n];
        for (int i=0; i<n-1
                ; i++){
            int val = Reader.nextInt();
            if (veri[val-1]==false){
                arr[val-1] = 1;
                veri[val-1]= true;
            }
            else {
            arr[val-1] = arr[val-1]+1;
            }
        }

        for (int i=0; i<n; i++){
            int val=0;
            if (veri[i]==false){
                val=0;
            }
            else {
                val= arr[i];
            }

            System.out.println(val);
        }

    }
} Main // driver function to test the above functions
    public static void main(String args[]) throws IOException {

        Reader.init(System.in);
        int n=  Reader.nextInt();
       int[] arr = new int[n];

       boolean[] veri = new boolean[n];
        for (int i=0; i<n-1
                ; i++){
            int val = Reader.nextInt();
            if (veri[val-1]==false){
                arr[val-1] = 1;
                veri[val-1]= true;
            }
            else {
            arr[val-1] = arr[val-1]+1;
            }
        }

        for (int i=0; i<n; i++){
            int val=0;
            if (veri[i]==false){
                val=0;
            }
            else {
                val= arr[i];
            }

            System.out.println(val);
        }

    } main {

        Reader.init(System.in);
        int n=  Reader.nextInt();
       int[] arr = new int[n];

       boolean[] veri = new boolean[n];
        for (int i=0; i<n-1
                ; i++){
            int val = Reader.nextInt();
            if (veri[val-1]==false){
                arr[val-1] = 1;
                veri[val-1]= true;
            }
            else {
            arr[val-1] = arr[val-1]+1;
            }
        }

        for (int i=0; i<n; i++){
            int val=0;
            if (veri[i]==false){
                val=0;
            }
            else {
                val= arr[i];
            }

            System.out.println(val);
        }

    } Reader.init(System.in) Reader.init Reader System.in System System.in int n=  Reader.nextInt(); n Reader.nextInt() Reader.nextInt Reader int[] arr = new int[n]; arr new int[n] n boolean[] veri = new boolean[n]; veri new boolean[n] n for (int i=0; i<n-1
                ; i++){
            int val = Reader.nextInt();
            if (veri[val-1]==false){
                arr[val-1] = 1;
                veri[val-1]= true;
            }
            else {
            arr[val-1] = arr[val-1]+1;
            }
        } int i=0; int i=0; i 0 i<n-1 i n-1 n 1 i++ i++ i {
            int val = Reader.nextInt();
            if (veri[val-1]==false){
                arr[val-1] = 1;
                veri[val-1]= true;
            }
            else {
            arr[val-1] = arr[val-1]+1;
            }
        } {
            int val = Reader.nextInt();
            if (veri[val-1]==false){
                arr[val-1] = 1;
                veri[val-1]= true;
            }
            else {
            arr[val-1] = arr[val-1]+1;
            }
        } int val = Reader.nextInt(); val Reader.nextInt() Reader.nextInt Reader if (veri[val-1]==false){
                arr[val-1] = 1;
                veri[val-1]= true;
            }
            else {
            arr[val-1] = arr[val-1]+1;
            } veri[val-1]==false veri[val-1] veri val-1 val 1 false {
                arr[val-1] = 1;
                veri[val-1]= true;
            } arr[val-1] = 1 arr[val-1] arr val-1 val 1 1 veri[val-1]= true veri[val-1] veri val-1 val 1 true {
            arr[val-1] = arr[val-1]+1;
            } arr[val-1] = arr[val-1]+1 arr[val-1] arr val-1 val 1 arr[val-1]+1 arr[val-1] arr val-1 val 1 1 for (int i=0; i<n; i++){
            int val=0;
            if (veri[i]==false){
                val=0;
            }
            else {
                val= arr[i];
            }

            System.out.println(val);
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            int val=0;
            if (veri[i]==false){
                val=0;
            }
            else {
                val= arr[i];
            }

            System.out.println(val);
        } {
            int val=0;
            if (veri[i]==false){
                val=0;
            }
            else {
                val= arr[i];
            }

            System.out.println(val);
        } int val=0; val 0 if (veri[i]==false){
                val=0;
            }
            else {
                val= arr[i];
            } veri[i]==false veri[i] veri i false {
                val=0;
            } val=0 val 0 {
                val= arr[i];
            } val= arr[i] val arr[i] arr i System.out.println(val) System.out.println System.out System System.out val String args[] args class Node{
    char val;
    Node nxt = null;
    Node prev=null;


} Node char val; val Node nxt = null; nxt null Node prev=null; prev null class solu{
    int gcd(int a, int b)
    {
        if (a == 0)
            return b;
        return gcd(b % a, a);
    }

} solu int gcd(int a, int b)
    {
        if (a == 0)
            return b;
        return gcd(b % a, a);
    } gcd {
        if (a == 0)
            return b;
        return gcd(b % a, a);
    } if (a == 0)
            return b; a == 0 a 0 return b; b return gcd(b % a, a); gcd(b % a, a) gcd b % a b a a int a a int b b class Reader {
    static BufferedReader reader;
    static StringTokenizer tokenizer;

    /** call this method to initialize reader for InputStream */
    static void init(InputStream input) {
        reader = new BufferedReader(
                new InputStreamReader(input) );
        tokenizer = new StringTokenizer("");
    }

    /** get next word */
    static String next() throws IOException {
        while ( ! tokenizer.hasMoreTokens() ) {
            //TODO add check for eof if necessary
            tokenizer = new StringTokenizer(
                    reader.readLine() );
        }
        return tokenizer.nextToken();
    }

    static int nextInt() throws IOException {
        return Integer.parseInt( next() );
    }

    static long nextLong() throws IOException {
        return Long.parseLong( next() );
    }

    static double nextDouble() throws IOException {
        return Double.parseDouble( next() );
    }

    static String line() throws IOException {
        return reader.readLine();
    }
} Reader static BufferedReader reader; reader static StringTokenizer tokenizer; tokenizer /** call this method to initialize reader for InputStream */
    static void init(InputStream input) {
        reader = new BufferedReader(
                new InputStreamReader(input) );
        tokenizer = new StringTokenizer("");
    } init {
        reader = new BufferedReader(
                new InputStreamReader(input) );
        tokenizer = new StringTokenizer("");
    } reader = new BufferedReader(
                new InputStreamReader(input) ) reader new BufferedReader(
                new InputStreamReader(input) ) tokenizer = new StringTokenizer("") tokenizer new StringTokenizer("") InputStream input input /** get next word */
    static String next() throws IOException {
        while ( ! tokenizer.hasMoreTokens() ) {
            //TODO add check for eof if necessary
            tokenizer = new StringTokenizer(
                    reader.readLine() );
        }
        return tokenizer.nextToken();
    } next {
        while ( ! tokenizer.hasMoreTokens() ) {
            //TODO add check for eof if necessary
            tokenizer = new StringTokenizer(
                    reader.readLine() );
        }
        return tokenizer.nextToken();
    } while ( ! tokenizer.hasMoreTokens() ) {
            //TODO add check for eof if necessary
            tokenizer = new StringTokenizer(
                    reader.readLine() );
        } ! tokenizer.hasMoreTokens() tokenizer.hasMoreTokens() tokenizer.hasMoreTokens tokenizer {
            //TODO add check for eof if necessary
            tokenizer = new StringTokenizer(
                    reader.readLine() );
        } tokenizer = new StringTokenizer(
                    reader.readLine() ) tokenizer new StringTokenizer(
                    reader.readLine() ) return tokenizer.nextToken(); tokenizer.nextToken() tokenizer.nextToken tokenizer static int nextInt() throws IOException {
        return Integer.parseInt( next() );
    } nextInt {
        return Integer.parseInt( next() );
    } return Integer.parseInt( next() ); Integer.parseInt( next() ) Integer.parseInt Integer next() next static long nextLong() throws IOException {
        return Long.parseLong( next() );
    } nextLong {
        return Long.parseLong( next() );
    } return Long.parseLong( next() ); Long.parseLong( next() ) Long.parseLong Long next() next static double nextDouble() throws IOException {
        return Double.parseDouble( next() );
    } nextDouble {
        return Double.parseDouble( next() );
    } return Double.parseDouble( next() ); Double.parseDouble( next() ) Double.parseDouble Double next() next static String line() throws IOException {
        return reader.readLine();
    } line {
        return reader.readLine();
    } return reader.readLine(); reader.readLine() reader.readLine reader public class Main {
    // driver function to test the above functions
    public static void main(String args[]) throws IOException {

        Reader.init(System.in);
        int n=  Reader.nextInt();
       int[] arr = new int[n];

       boolean[] veri = new boolean[n];
        for (int i=0; i<n-1
                ; i++){
            int val = Reader.nextInt();
            if (veri[val-1]==false){
                arr[val-1] = 1;
                veri[val-1]= true;
            }
            else {
            arr[val-1] = arr[val-1]+1;
            }
        }

        for (int i=0; i<n; i++){
            int val=0;
            if (veri[i]==false){
                val=0;
            }
            else {
                val= arr[i];
            }

            System.out.println(val);
        }

    }
} public class Main {
    // driver function to test the above functions
    public static void main(String args[]) throws IOException {

        Reader.init(System.in);
        int n=  Reader.nextInt();
       int[] arr = new int[n];

       boolean[] veri = new boolean[n];
        for (int i=0; i<n-1
                ; i++){
            int val = Reader.nextInt();
            if (veri[val-1]==false){
                arr[val-1] = 1;
                veri[val-1]= true;
            }
            else {
            arr[val-1] = arr[val-1]+1;
            }
        }

        for (int i=0; i<n; i++){
            int val=0;
            if (veri[i]==false){
                val=0;
            }
            else {
                val= arr[i];
            }

            System.out.println(val);
        }

    }
} Main
import javax.management.MBeanRegistration;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.lang.reflect.Array;
import java.util.StringTokenizer;
import java.util.Scanner;
import java.lang.*;
import java.io.*;
import java.util.*;
import java.lang.Integer;
import java.util.HashMap;

public class Main {
    // driver function to test the above functions
    public static void main(String args[]) throws IOException {

        Reader.init(System.in);
        int n=  Reader.nextInt();
       int[] arr = new int[n];

       boolean[] veri = new boolean[n];
        for (int i=0; i<n-1
                ; i++){
            int val = Reader.nextInt();
            if (veri[val-1]==false){
                arr[val-1] = 1;
                veri[val-1]= true;
            }
            else {
            arr[val-1] = arr[val-1]+1;
            }
        }

        for (int i=0; i<n; i++){
            int val=0;
            if (veri[i]==false){
                val=0;
            }
            else {
                val= arr[i];
            }

            System.out.println(val);
        }

    }
}

class Node{
    char val;
    Node nxt = null;
    Node prev=null;


}



class solu{
    int gcd(int a, int b)
    {
        if (a == 0)
            return b;
        return gcd(b % a, a);
    }

}

/** Class for buffered reading int and double values */
class Reader {
    static BufferedReader reader;
    static StringTokenizer tokenizer;

    /** call this method to initialize reader for InputStream */
    static void init(InputStream input) {
        reader = new BufferedReader(
                new InputStreamReader(input) );
        tokenizer = new StringTokenizer("");
    }

    /** get next word */
    static String next() throws IOException {
        while ( ! tokenizer.hasMoreTokens() ) {
            //TODO add check for eof if necessary
            tokenizer = new StringTokenizer(
                    reader.readLine() );
        }
        return tokenizer.nextToken();
    }

    static int nextInt() throws IOException {
        return Integer.parseInt( next() );
    }

    static long nextLong() throws IOException {
        return Long.parseLong( next() );
    }

    static double nextDouble() throws IOException {
        return Double.parseDouble( next() );
    }

    static String line() throws IOException {
        return reader.readLine();
    }
}