Problem5321--ABC163——Task C:management

5321: ABC163——Task C:management

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 256 MiB

Description

A company has NN members, who are assigned ID numbers 1,...,N1,...,N.

Every member, except the member numbered 11, has exactly one immediate boss with a smaller ID number.

When a person XX is the immediate boss of a person YY, the person YY is said to be an immediate subordinate of the person XX.

You are given the information that the immediate boss of the member numbered ii is the member numbered AiAi. For each member, find how many immediate subordinates it has.

Input

Input is given from Standard Input in the following format:
N
A2 ... AN

Output

For each of the members numbered 1,2,...,N1,2,...,N, print the number of immediate subordinates it has, in its own line.

Constraints

  • 2N2×1052≤N≤2×105
  • 1Ai<i1≤Ai<i

Sample 1 Input

5
1 1 2 2

Sample 1 Output

2
2
0
0
0

The member numbered 11 has two immediate subordinates: the members numbered 22 and 33.

The member numbered 22 has two immediate subordinates: the members numbered 44 and 55.

The members numbered 3344, and 55 do not have immediate subordinates.

Sample 2 Input

10
1 1 1 1 1 1 1 1 1

Sample 2 Output

9
0
0
0
0
0
0
0
0
0

Sample 3 Input

7
1 2 3 4 5 6

Sample 3 Output

1
1
1
1
1
1
0

HINT

AtCoder Beginner Contest 163,Task C。https://atcoder.jp/contests/abc163/tasks/abc163_c

Source/Category