#include <bits/stdc++.h>
using namespace std;
void read(long long int n = 10) {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout << setprecision(n) << fixed;
}
long long int M = 1e9 + 7;
long long int M1 = 998244353;
int32_t main() {
  read();
  long long int n;
  cin >> n;
  vector<long long int> arr(n);
  ;
  vector<vector<long long int>> graph(n + 1);
  for (long long int i = 1; i < n; i++) {
    cin >> arr[i];
    graph[arr[i]].push_back(i + 1);
  }
  for (long long int i = 1; i <= n; i++) cout << graph[i].size() << "\n";
}
