#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
const int maxx = 1e5 + 7;
const int Inf = 1 << 30;
const LL INF = 1LL << 60;
int n;
int a[maxx];
vector <int> vec[maxx];

int main() {
	cin >> n;
	for(int i = 2; i <= n; i++) {
		cin >> a[i];
		vec[a[i]].push_back(i);
	}
	for(int i = 1; i <= n; i++) printf("%d\n", vec[i].size());
	return 0;
}