#include<iostream>
#include<algorithm>
#include<cstdio>
#include<string>
#include<cstring>
#include<numeric>
#include<vector>
#include<map>
#include<queue>
#include<set>
#include<stack>
#include<cmath>
using namespace std;
typedef long long ll;
typedef pair<int,int>PII;
typedef pair<ll,ll>PLL;
typedef long double ld;

int main(){
	map<int,vector<int> >mp;
	int n;
	cin>>n;
	for(int i=2;i<=n;i++){
		int num;
		cin>>num;
		mp[num].push_back(i);
	}
	for(int i=1;i<=n;i++){
		cout<<mp[i].size()<<endl;
	}


	return 0;
}