    #include<bits/stdc++.h>
    #define ll long long
    #define pb push_back
    #define fi first
    #define se second
    ll sieve[1000001]={0},i,j;
    ll m=1e9+7;
    ll lev=0;
    ll n,k;
    ll power(ll p, ll k)
    {
    ll a=1;
    while(k)
    {
    if(k&1)
    a=(a*p)%m;
    p=(p*p)%m;
    k>>=1;
    }
    return a;
    }
    using namespace std;
    vector<ll> v[1000000+1];
    ll vis[1000000+1]={0};
    void dfs(ll u,ll p,ll lev)
    {
        vis[u]=lev;
    for(auto x: v[u])
    {
    if(x!=p)
    {
    dfs(x,u,lev+1);
    }
    }
    }
    int main()
    {
        ios_base::sync_with_stdio(false);
        cin.tie(NULL);
     int tc=1;
    //cin>>tc;
    ll cas=1;
     while(tc--)
     {
      
    ll n;
    cin>>n;
    ll a[n+1];
    map<ll,ll> m;
    for(i=2;i<=n;i++)
    {
    cin>>a[i];
    m[a[i]]++;
    }
    for(i=1;i<=n;i++)
    {
    cout<<m[i];
         cout<<"\n";
     } 
     } 
    }

#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define fi first
#define se second
ll sieve[1000001]={0},i,j;
ll m=1e9+7;
ll lev=0;
ll n,k;
ll power(ll p, ll k)
{
ll a=1;
while(k)
{
if(k&1)
a=(a*p)%m;
p=(p*p)%m;
k>>=1;
}
return a;
}
using namespace std;
vector<ll> v[1000000+1];
ll vis[1000000+1]={0};
void dfs(ll u,ll p,ll lev)
{
    vis[u]=lev;
for(auto x: v[u])
{
if(x!=p)
{
dfs(x,u,lev+1);
}
}
}
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
 int tc=1;
//cin>>tc;
ll cas=1;
 while(tc--)
 {
  
ll n;
cin>>n;
ll a[n+1];
map<ll,ll> m;
for(i=2;i<=n;i++)
{
cin>>a[i];
m[a[i]]++;
}
for(i=1;i<=n;i++)
{
cout<<m[i];
     cout<<"\n";
 } 
 } 
}