You have a tree with n employees. Employee is the boss (root). For each employee, count how many subordinates they have. Subordinates are all employees in their subtree, excluding the employee themselves. Input: First line is n (number of employees). Second line has numbers: the boss of employees , ,., n.
Output: n numbers, the subordinate count for each employee. Example: If employee has employees and below them, and employee has employee , then employee has subordinates (employees , , ).