import java.util.*; 
import java.io.*;

public class Main{
    static StringTokenizer st;
    static BufferedReader br;  
    static PrintWriter out;
 
    public static void main(String[] args) throws IOException {
        br = new BufferedReader(new InputStreamReader(System.in));
 
        int N = nextInt();
        
        int[] postion = new int[N+1];
        int[] cnt = new int[N+1];
 
        for (int i=2; i<=N; i++) {
            postion[i] = nextInt();
        }

        // Every member has exactly one immediate boss with a smaller ID number.
        for (int i=N; i>=1; i--) {
            cnt[postion[i]] ++;
        }

        for (int i=1; i<=N; i++) {
            System.out.println(cnt[i]);
        }

        
    }

    public static int gcd(int a, int b) {
        if(b==0) return a;

        return gcd(b, a%b);
    }
      
    public static int nextInt() throws IOException {
        return Integer.parseInt(next());
    }
    public static long nextLong() throws IOException {
        return Long.parseLong(next());
    }

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

    static String next() throws IOException {
        while (st == null || !st.hasMoreTokens())
            st = new StringTokenizer(br.readLine().trim());
        return st.nextToken();
    }
} import java.util.*; util.* java import java.io.*; io.* java public class Main{
    static StringTokenizer st;
    static BufferedReader br;  
    static PrintWriter out;
 
    public static void main(String[] args) throws IOException {
        br = new BufferedReader(new InputStreamReader(System.in));
 
        int N = nextInt();
        
        int[] postion = new int[N+1];
        int[] cnt = new int[N+1];
 
        for (int i=2; i<=N; i++) {
            postion[i] = nextInt();
        }

        // Every member has exactly one immediate boss with a smaller ID number.
        for (int i=N; i>=1; i--) {
            cnt[postion[i]] ++;
        }

        for (int i=1; i<=N; i++) {
            System.out.println(cnt[i]);
        }

        
    }

    public static int gcd(int a, int b) {
        if(b==0) return a;

        return gcd(b, a%b);
    }
      
    public static int nextInt() throws IOException {
        return Integer.parseInt(next());
    }
    public static long nextLong() throws IOException {
        return Long.parseLong(next());
    }

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

    static String next() throws IOException {
        while (st == null || !st.hasMoreTokens())
            st = new StringTokenizer(br.readLine().trim());
        return st.nextToken();
    }
} Main static StringTokenizer st; st static BufferedReader br; br static PrintWriter out; out public static void main(String[] args) throws IOException {
        br = new BufferedReader(new InputStreamReader(System.in));
 
        int N = nextInt();
        
        int[] postion = new int[N+1];
        int[] cnt = new int[N+1];
 
        for (int i=2; i<=N; i++) {
            postion[i] = nextInt();
        }

        // Every member has exactly one immediate boss with a smaller ID number.
        for (int i=N; i>=1; i--) {
            cnt[postion[i]] ++;
        }

        for (int i=1; i<=N; i++) {
            System.out.println(cnt[i]);
        }

        
    } main {
        br = new BufferedReader(new InputStreamReader(System.in));
 
        int N = nextInt();
        
        int[] postion = new int[N+1];
        int[] cnt = new int[N+1];
 
        for (int i=2; i<=N; i++) {
            postion[i] = nextInt();
        }

        // Every member has exactly one immediate boss with a smaller ID number.
        for (int i=N; i>=1; i--) {
            cnt[postion[i]] ++;
        }

        for (int i=1; i<=N; i++) {
            System.out.println(cnt[i]);
        }

        
    } br = new BufferedReader(new InputStreamReader(System.in)) br new BufferedReader(new InputStreamReader(System.in)) int N = nextInt(); N nextInt() nextInt int[] postion = new int[N+1]; postion new int[N+1] N+1 N 1 int[] cnt = new int[N+1]; cnt new int[N+1] N+1 N 1 for (int i=2; i<=N; i++) {
            postion[i] = nextInt();
        } int i=2; int i=2; i 2 i<=N i N i++ i++ i {
            postion[i] = nextInt();
        } {
            postion[i] = nextInt();
        } postion[i] = nextInt() postion[i] postion i nextInt() nextInt for (int i=N; i>=1; i--) {
            cnt[postion[i]] ++;
        } int i=N; int i=N; i N i>=1 i 1 i-- i-- i {
            cnt[postion[i]] ++;
        } {
            cnt[postion[i]] ++;
        } cnt[postion[i]] ++ cnt[postion[i]] cnt postion[i] postion i for (int i=1; i<=N; i++) {
            System.out.println(cnt[i]);
        } int i=1; int i=1; i 1 i<=N i N i++ i++ i {
            System.out.println(cnt[i]);
        } {
            System.out.println(cnt[i]);
        } System.out.println(cnt[i]) System.out.println System.out System System.out cnt[i] cnt i String[] args args public static int gcd(int a, int b) {
        if(b==0) return a;

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

        return gcd(b, a%b);
    } if(b==0) return a; b==0 b 0 return a; a return gcd(b, a%b); gcd(b, a%b) gcd b a%b a b int a a int b b public 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 public 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 public 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 next() throws IOException {
        while (st == null || !st.hasMoreTokens())
            st = new StringTokenizer(br.readLine().trim());
        return st.nextToken();
    } next {
        while (st == null || !st.hasMoreTokens())
            st = new StringTokenizer(br.readLine().trim());
        return st.nextToken();
    } while (st == null || !st.hasMoreTokens())
            st = new StringTokenizer(br.readLine().trim()); st == null || !st.hasMoreTokens() st == null st null !st.hasMoreTokens() st.hasMoreTokens() st.hasMoreTokens st st = new StringTokenizer(br.readLine().trim()) st new StringTokenizer(br.readLine().trim()) return st.nextToken(); st.nextToken() st.nextToken st public class Main{
    static StringTokenizer st;
    static BufferedReader br;  
    static PrintWriter out;
 
    public static void main(String[] args) throws IOException {
        br = new BufferedReader(new InputStreamReader(System.in));
 
        int N = nextInt();
        
        int[] postion = new int[N+1];
        int[] cnt = new int[N+1];
 
        for (int i=2; i<=N; i++) {
            postion[i] = nextInt();
        }

        // Every member has exactly one immediate boss with a smaller ID number.
        for (int i=N; i>=1; i--) {
            cnt[postion[i]] ++;
        }

        for (int i=1; i<=N; i++) {
            System.out.println(cnt[i]);
        }

        
    }

    public static int gcd(int a, int b) {
        if(b==0) return a;

        return gcd(b, a%b);
    }
      
    public static int nextInt() throws IOException {
        return Integer.parseInt(next());
    }
    public static long nextLong() throws IOException {
        return Long.parseLong(next());
    }

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

    static String next() throws IOException {
        while (st == null || !st.hasMoreTokens())
            st = new StringTokenizer(br.readLine().trim());
        return st.nextToken();
    }
} public class Main{
    static StringTokenizer st;
    static BufferedReader br;  
    static PrintWriter out;
 
    public static void main(String[] args) throws IOException {
        br = new BufferedReader(new InputStreamReader(System.in));
 
        int N = nextInt();
        
        int[] postion = new int[N+1];
        int[] cnt = new int[N+1];
 
        for (int i=2; i<=N; i++) {
            postion[i] = nextInt();
        }

        // Every member has exactly one immediate boss with a smaller ID number.
        for (int i=N; i>=1; i--) {
            cnt[postion[i]] ++;
        }

        for (int i=1; i<=N; i++) {
            System.out.println(cnt[i]);
        }

        
    }

    public static int gcd(int a, int b) {
        if(b==0) return a;

        return gcd(b, a%b);
    }
      
    public static int nextInt() throws IOException {
        return Integer.parseInt(next());
    }
    public static long nextLong() throws IOException {
        return Long.parseLong(next());
    }

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

    static String next() throws IOException {
        while (st == null || !st.hasMoreTokens())
            st = new StringTokenizer(br.readLine().trim());
        return st.nextToken();
    }
} Main
import java.util.*; 
import java.io.*;

public class Main{
    static StringTokenizer st;
    static BufferedReader br;  
    static PrintWriter out;
 
    public static void main(String[] args) throws IOException {
        br = new BufferedReader(new InputStreamReader(System.in));
 
        int N = nextInt();
        
        int[] postion = new int[N+1];
        int[] cnt = new int[N+1];
 
        for (int i=2; i<=N; i++) {
            postion[i] = nextInt();
        }

        // Every member has exactly one immediate boss with a smaller ID number.
        for (int i=N; i>=1; i--) {
            cnt[postion[i]] ++;
        }

        for (int i=1; i<=N; i++) {
            System.out.println(cnt[i]);
        }

        
    }

    public static int gcd(int a, int b) {
        if(b==0) return a;

        return gcd(b, a%b);
    }
      
    public static int nextInt() throws IOException {
        return Integer.parseInt(next());
    }
    public static long nextLong() throws IOException {
        return Long.parseLong(next());
    }

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

    static String next() throws IOException {
        while (st == null || !st.hasMoreTokens())
            st = new StringTokenizer(br.readLine().trim());
        return st.nextToken();
    }
}