#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define all(x) x.begin(),x.end()

int const N = 200001;
int n;
vector<int> g[N];

int main(){
    scanf("%d", &n);
    for(int i = 0, x; i<n-1; ++i){
        scanf("%d", &x);
        g[x].push_back(i+1);
    }
    for(int i = 1; i<=n; ++i)printf("%d\n", g[i].size());
}