#include <bits/stdc++.h>
#include <cstdio>
#include <algorithm>
#include <functional>
using namespace std;

 #define tr(c, i) for (__typeof((c).begin()) i = (c).begin(); i != (c).end(); i++)
#define   ipr         	pair<int, int>
#define   pb            push_back
#define   ff            first
#define   ss            second
#define   fr(i, j, k)   for (int i = j; i < k; i++)
#define   rf(i, j, k)   for (int i = j; i >= k;i--)
#define   int           long long
#define   ll 			unsigned long long
#define   ld            long double
#define   all(x)        x.begin(), x.end()
#define   rall(x)       x.rbegin(),x.rend()
#define   mp            make_pair
#define   inf           INT_MAX
#define   read_file();	freopen("input.txt", "r", stdin);	freopen("output.txt", "w", stdout);
#define   IOS           std::ios::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
 
const int Maxn  =  200*1000 + 1;
const ld  pi   =  acos(-1);
const int mod =  1000000007;
 
 
template<class T> ostream& operator <<(ostream &out,vector<T> &A){for(auto x:A) out<<x<<" ";return out;}
template<class T> ostream& operator <<(ostream &out,set<T> &A){for(auto x:A) out<<x<<" ";return out;}
template <class T1,class T2>T1 powr(T1 a,T2 b){T1 res = 1;fr(i,1,b+1)res = res*a;return res;}
int roundUp(int numToRound, int multiple)
{
 if(multiple == 0)
 {
  return numToRound;
 }

 int roundDown = ( (int) (numToRound) / multiple) * multiple;
 int roundUp = roundDown + multiple; 
 int roundCalc = roundUp;
 return (roundCalc);
}


 

int calc(int a, int b, int c) {
	return abs(a - b) + abs(a - c) + abs(b - c);
}


//Binary exponentiation
int binpow(int a,int b) {
    int res = 1;
while (b > 0) {
        if (b & 1)res = res * a;
        a = a * a;
        b >>= 1;
}
return res;
}
// gcd
int gcd(int a, int b){
    while(b){
        a=a%b;
        swap(a,b);
    }
    return a;
}
//lcm
int lcm(int a, int b){
    return (a*b)/gcd(a,b);
}
  
 bool isSubSequence(string str1, string str2 ) 
{ int m=str1.length(),n=str2.length();
   int j = 0; 
   for (int i=0; i<n&&j<m; i++) 
       if (str1[j] == str2[i]) 
         j++; 
  
   
   return (j==m); 
} 
  
  void eraseAllSubStr(string &mainStr, string &toErase)
{
	size_t pos = std::string::npos;
 
	
	while ((pos  = mainStr.find(toErase) )!= std::string::npos)
	{
		
		mainStr.erase(pos, toErase.length());
        mainStr.insert(pos," ");
	}
}

int isSubstring(string s1, string s2) 
{ 
    int M = s1.length(); 
    int N = s2.length(); 
  
    /* A loop to slide pat[] one by one */
    for (int i = 0; i <= N - M; i++) { 
        int j; 
  
        /* For current index i, check for pattern match */
        for (j = 0; j < M; j++) 
            if (s2[i + j] != s1[j]) 
                break; 
  
        if (j == M) 
            return i; 
    } 
  
    return -1; 
} 







int countPrimitiveRoots(int p) 
{ 
    int result = 1; 
    for (int i = 2; i < p; i++) 
        if (__gcd(i, p) == 1) 
            result++; 
  
    return result; 
} 

   int a[200010];
 int ans[200010];
    
 
 int32_t main(){

    IOS;
 

    int n;
 cin>>n;

 for(int i=2;i<=n;i++)cin>>a[i];
 for(int i=2;i<=n;i++)ans[a[i]]++;
 for(int i=1;i<=n;i++)cout<<ans[i]<<endl;

    
     }
 
  
 

Measured memory_bytes: 6788