#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
typedef vector<vector<int>> vvi;

int main() {
	int N;
	cin>>N;
	vvi tree(N);
	for (int i = 1; i < N; i++){
		int a;
		cin>>a;
		tree[a-1].push_back(i);
	}
	for (int i = 0; i < N; i++){
		cout<<tree[i].size()<<endl;
	}
}