#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main() {
  int N;
  cin >> N;
 
  vector<int> p(N);
  p.at(0) = -1;
  for (int i = 1; i < N; i++) {
    cin >> p.at(i);
  }
 
  vector<vector<int>> children(N);
  for (int i = 1; i < N; i++) {
    int parent = p.at(i) - 1;
    children.at(parent).push_back(i);
  }
 
  for (int i = 0; i < N; i++) {
    cout << children.at(i).size() << endl;
  }
}