import java.util.*;
import java.lang.*;
import java.util.stream.*;

public class Main {

    public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);
        Integer n = Integer.parseInt(scanner.next());
        Integer[] a = new Integer[n - 1];
        List<Integer> list = new ArrayList<Integer>();

        for (int i = 0; i < n - 1; i++) {
            list.add(Integer.parseInt(scanner.next()));
        }

        Map<Integer, Integer> map = new HashMap<Integer, Integer>();
        for (Integer temp : list) {
            Integer count = map.get(temp);
            map.put(temp, (count == null) ? 1 : count + 1);
        }

        Integer[] total = new Integer[n];
        Arrays.fill(total, 0);
        for (Integer nKey : map.keySet())
        {
            total[nKey-1] = map.get(nKey);
        }

        for(int i = 0; i < total.length; i++) {
            System.out.println(total[i]);
        }
    }
} import java.util.*; util.* java import java.lang.*; lang.* java import java.util.stream.*; stream.* java.util public class Main {

    public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);
        Integer n = Integer.parseInt(scanner.next());
        Integer[] a = new Integer[n - 1];
        List<Integer> list = new ArrayList<Integer>();

        for (int i = 0; i < n - 1; i++) {
            list.add(Integer.parseInt(scanner.next()));
        }

        Map<Integer, Integer> map = new HashMap<Integer, Integer>();
        for (Integer temp : list) {
            Integer count = map.get(temp);
            map.put(temp, (count == null) ? 1 : count + 1);
        }

        Integer[] total = new Integer[n];
        Arrays.fill(total, 0);
        for (Integer nKey : map.keySet())
        {
            total[nKey-1] = map.get(nKey);
        }

        for(int i = 0; i < total.length; i++) {
            System.out.println(total[i]);
        }
    }
} Main public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);
        Integer n = Integer.parseInt(scanner.next());
        Integer[] a = new Integer[n - 1];
        List<Integer> list = new ArrayList<Integer>();

        for (int i = 0; i < n - 1; i++) {
            list.add(Integer.parseInt(scanner.next()));
        }

        Map<Integer, Integer> map = new HashMap<Integer, Integer>();
        for (Integer temp : list) {
            Integer count = map.get(temp);
            map.put(temp, (count == null) ? 1 : count + 1);
        }

        Integer[] total = new Integer[n];
        Arrays.fill(total, 0);
        for (Integer nKey : map.keySet())
        {
            total[nKey-1] = map.get(nKey);
        }

        for(int i = 0; i < total.length; i++) {
            System.out.println(total[i]);
        }
    } main {
        //コード
        Scanner scanner = new Scanner(System.in);
        Integer n = Integer.parseInt(scanner.next());
        Integer[] a = new Integer[n - 1];
        List<Integer> list = new ArrayList<Integer>();

        for (int i = 0; i < n - 1; i++) {
            list.add(Integer.parseInt(scanner.next()));
        }

        Map<Integer, Integer> map = new HashMap<Integer, Integer>();
        for (Integer temp : list) {
            Integer count = map.get(temp);
            map.put(temp, (count == null) ? 1 : count + 1);
        }

        Integer[] total = new Integer[n];
        Arrays.fill(total, 0);
        for (Integer nKey : map.keySet())
        {
            total[nKey-1] = map.get(nKey);
        }

        for(int i = 0; i < total.length; i++) {
            System.out.println(total[i]);
        }
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) Integer n = Integer.parseInt(scanner.next()); n Integer.parseInt(scanner.next()) Integer.parseInt Integer scanner.next() scanner.next scanner Integer[] a = new Integer[n - 1]; a new Integer[n - 1] n - 1 n 1 List<Integer> list = new ArrayList<Integer>(); list new ArrayList<Integer>() for (int i = 0; i < n - 1; i++) {
            list.add(Integer.parseInt(scanner.next()));
        } int i = 0; int i = 0; i 0 i < n - 1 i n - 1 n 1 i++ i++ i {
            list.add(Integer.parseInt(scanner.next()));
        } {
            list.add(Integer.parseInt(scanner.next()));
        } list.add(Integer.parseInt(scanner.next())) list.add list Integer.parseInt(scanner.next()) Integer.parseInt Integer scanner.next() scanner.next scanner Map<Integer, Integer> map = new HashMap<Integer, Integer>(); map new HashMap<Integer, Integer>() for (Integer temp : list) {
            Integer count = map.get(temp);
            map.put(temp, (count == null) ? 1 : count + 1);
        } Integer temp list {
            Integer count = map.get(temp);
            map.put(temp, (count == null) ? 1 : count + 1);
        } {
            Integer count = map.get(temp);
            map.put(temp, (count == null) ? 1 : count + 1);
        } Integer count = map.get(temp); count map.get(temp) map.get map temp map.put(temp, (count == null) ? 1 : count + 1) map.put map temp (count == null) ? 1 : count + 1 (count == null) count null 1 count + 1 count 1 Integer[] total = new Integer[n]; total new Integer[n] n Arrays.fill(total, 0) Arrays.fill Arrays total 0 for (Integer nKey : map.keySet())
        {
            total[nKey-1] = map.get(nKey);
        } Integer nKey map.keySet() map.keySet map {
            total[nKey-1] = map.get(nKey);
        } {
            total[nKey-1] = map.get(nKey);
        } total[nKey-1] = map.get(nKey) total[nKey-1] total nKey-1 nKey 1 map.get(nKey) map.get map nKey for(int i = 0; i < total.length; i++) {
            System.out.println(total[i]);
        } int i = 0; int i = 0; i 0 i < total.length i total.length total total.length i++ i++ i {
            System.out.println(total[i]);
        } {
            System.out.println(total[i]);
        } System.out.println(total[i]) System.out.println System.out System System.out total[i] total i String[] args args public class Main {

    public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);
        Integer n = Integer.parseInt(scanner.next());
        Integer[] a = new Integer[n - 1];
        List<Integer> list = new ArrayList<Integer>();

        for (int i = 0; i < n - 1; i++) {
            list.add(Integer.parseInt(scanner.next()));
        }

        Map<Integer, Integer> map = new HashMap<Integer, Integer>();
        for (Integer temp : list) {
            Integer count = map.get(temp);
            map.put(temp, (count == null) ? 1 : count + 1);
        }

        Integer[] total = new Integer[n];
        Arrays.fill(total, 0);
        for (Integer nKey : map.keySet())
        {
            total[nKey-1] = map.get(nKey);
        }

        for(int i = 0; i < total.length; i++) {
            System.out.println(total[i]);
        }
    }
} public class Main {

    public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);
        Integer n = Integer.parseInt(scanner.next());
        Integer[] a = new Integer[n - 1];
        List<Integer> list = new ArrayList<Integer>();

        for (int i = 0; i < n - 1; i++) {
            list.add(Integer.parseInt(scanner.next()));
        }

        Map<Integer, Integer> map = new HashMap<Integer, Integer>();
        for (Integer temp : list) {
            Integer count = map.get(temp);
            map.put(temp, (count == null) ? 1 : count + 1);
        }

        Integer[] total = new Integer[n];
        Arrays.fill(total, 0);
        for (Integer nKey : map.keySet())
        {
            total[nKey-1] = map.get(nKey);
        }

        for(int i = 0; i < total.length; i++) {
            System.out.println(total[i]);
        }
    }
} Main
import java.util.*;
import java.lang.*;
import java.util.stream.*;

public class Main {

    public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);
        Integer n = Integer.parseInt(scanner.next());
        Integer[] a = new Integer[n - 1];
        List<Integer> list = new ArrayList<Integer>();

        for (int i = 0; i < n - 1; i++) {
            list.add(Integer.parseInt(scanner.next()));
        }

        Map<Integer, Integer> map = new HashMap<Integer, Integer>();
        for (Integer temp : list) {
            Integer count = map.get(temp);
            map.put(temp, (count == null) ? 1 : count + 1);
        }

        Integer[] total = new Integer[n];
        Arrays.fill(total, 0);
        for (Integer nKey : map.keySet())
        {
            total[nKey-1] = map.get(nKey);
        }

        for(int i = 0; i < total.length; i++) {
            System.out.println(total[i]);
        }
    }
}