import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Scanner;
import java.util.Map.Entry;

public class Main {

    private static Map<Integer, Integer> m_mapBossId = new LinkedHashMap<Integer, Integer>();

    public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);
        final int iEmployeeNum = Integer.parseInt(sc.next());
        initBossId(iEmployeeNum);

        // 社員番号1が固定でいるため。
        for (int i = 1; i <= iEmployeeNum - 1; i++) {
            final int iBossId = Integer.parseInt(sc.next());
            int iSub = m_mapBossId.get(iBossId);
            iSub++;
            m_mapBossId.put(iBossId, iSub);
        }
        output();
    }

    private static void initBossId(final int iEmploy) {
        for (int id = 1; id <= iEmploy; id++) {
            m_mapBossId.put(id, 0);
        }
    }

    private static void output() {
        for (Entry entry : m_mapBossId.entrySet()) {
            System.out.println(entry.getValue());
        }
    }
} import java.util.LinkedHashMap; LinkedHashMap java.util import java.util.Map; Map java.util import java.util.Scanner; Scanner java.util import java.util.Map.Entry; Entry java.util.Map public class Main {

    private static Map<Integer, Integer> m_mapBossId = new LinkedHashMap<Integer, Integer>();

    public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);
        final int iEmployeeNum = Integer.parseInt(sc.next());
        initBossId(iEmployeeNum);

        // 社員番号1が固定でいるため。
        for (int i = 1; i <= iEmployeeNum - 1; i++) {
            final int iBossId = Integer.parseInt(sc.next());
            int iSub = m_mapBossId.get(iBossId);
            iSub++;
            m_mapBossId.put(iBossId, iSub);
        }
        output();
    }

    private static void initBossId(final int iEmploy) {
        for (int id = 1; id <= iEmploy; id++) {
            m_mapBossId.put(id, 0);
        }
    }

    private static void output() {
        for (Entry entry : m_mapBossId.entrySet()) {
            System.out.println(entry.getValue());
        }
    }
} Main private static Map<Integer, Integer> m_mapBossId = new LinkedHashMap<Integer, Integer>(); m_mapBossId new LinkedHashMap<Integer, Integer>() public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);
        final int iEmployeeNum = Integer.parseInt(sc.next());
        initBossId(iEmployeeNum);

        // 社員番号1が固定でいるため。
        for (int i = 1; i <= iEmployeeNum - 1; i++) {
            final int iBossId = Integer.parseInt(sc.next());
            int iSub = m_mapBossId.get(iBossId);
            iSub++;
            m_mapBossId.put(iBossId, iSub);
        }
        output();
    } main {

        Scanner sc = new Scanner(System.in);
        final int iEmployeeNum = Integer.parseInt(sc.next());
        initBossId(iEmployeeNum);

        // 社員番号1が固定でいるため。
        for (int i = 1; i <= iEmployeeNum - 1; i++) {
            final int iBossId = Integer.parseInt(sc.next());
            int iSub = m_mapBossId.get(iBossId);
            iSub++;
            m_mapBossId.put(iBossId, iSub);
        }
        output();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) final int iEmployeeNum = Integer.parseInt(sc.next()); iEmployeeNum Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc initBossId(iEmployeeNum) initBossId iEmployeeNum for (int i = 1; i <= iEmployeeNum - 1; i++) {
            final int iBossId = Integer.parseInt(sc.next());
            int iSub = m_mapBossId.get(iBossId);
            iSub++;
            m_mapBossId.put(iBossId, iSub);
        } int i = 1; int i = 1; i 1 i <= iEmployeeNum - 1 i iEmployeeNum - 1 iEmployeeNum 1 i++ i++ i {
            final int iBossId = Integer.parseInt(sc.next());
            int iSub = m_mapBossId.get(iBossId);
            iSub++;
            m_mapBossId.put(iBossId, iSub);
        } {
            final int iBossId = Integer.parseInt(sc.next());
            int iSub = m_mapBossId.get(iBossId);
            iSub++;
            m_mapBossId.put(iBossId, iSub);
        } final int iBossId = Integer.parseInt(sc.next()); iBossId Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int iSub = m_mapBossId.get(iBossId); iSub m_mapBossId.get(iBossId) m_mapBossId.get m_mapBossId iBossId iSub++ iSub m_mapBossId.put(iBossId, iSub) m_mapBossId.put m_mapBossId iBossId iSub output() output String[] args args private static void initBossId(final int iEmploy) {
        for (int id = 1; id <= iEmploy; id++) {
            m_mapBossId.put(id, 0);
        }
    } initBossId {
        for (int id = 1; id <= iEmploy; id++) {
            m_mapBossId.put(id, 0);
        }
    } for (int id = 1; id <= iEmploy; id++) {
            m_mapBossId.put(id, 0);
        } int id = 1; int id = 1; id 1 id <= iEmploy id iEmploy id++ id++ id {
            m_mapBossId.put(id, 0);
        } {
            m_mapBossId.put(id, 0);
        } m_mapBossId.put(id, 0) m_mapBossId.put m_mapBossId id 0 final int iEmploy iEmploy private static void output() {
        for (Entry entry : m_mapBossId.entrySet()) {
            System.out.println(entry.getValue());
        }
    } output {
        for (Entry entry : m_mapBossId.entrySet()) {
            System.out.println(entry.getValue());
        }
    } for (Entry entry : m_mapBossId.entrySet()) {
            System.out.println(entry.getValue());
        } Entry entry m_mapBossId.entrySet() m_mapBossId.entrySet m_mapBossId {
            System.out.println(entry.getValue());
        } {
            System.out.println(entry.getValue());
        } System.out.println(entry.getValue()) System.out.println System.out System System.out entry.getValue() entry.getValue entry public class Main {

    private static Map<Integer, Integer> m_mapBossId = new LinkedHashMap<Integer, Integer>();

    public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);
        final int iEmployeeNum = Integer.parseInt(sc.next());
        initBossId(iEmployeeNum);

        // 社員番号1が固定でいるため。
        for (int i = 1; i <= iEmployeeNum - 1; i++) {
            final int iBossId = Integer.parseInt(sc.next());
            int iSub = m_mapBossId.get(iBossId);
            iSub++;
            m_mapBossId.put(iBossId, iSub);
        }
        output();
    }

    private static void initBossId(final int iEmploy) {
        for (int id = 1; id <= iEmploy; id++) {
            m_mapBossId.put(id, 0);
        }
    }

    private static void output() {
        for (Entry entry : m_mapBossId.entrySet()) {
            System.out.println(entry.getValue());
        }
    }
} public class Main {

    private static Map<Integer, Integer> m_mapBossId = new LinkedHashMap<Integer, Integer>();

    public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);
        final int iEmployeeNum = Integer.parseInt(sc.next());
        initBossId(iEmployeeNum);

        // 社員番号1が固定でいるため。
        for (int i = 1; i <= iEmployeeNum - 1; i++) {
            final int iBossId = Integer.parseInt(sc.next());
            int iSub = m_mapBossId.get(iBossId);
            iSub++;
            m_mapBossId.put(iBossId, iSub);
        }
        output();
    }

    private static void initBossId(final int iEmploy) {
        for (int id = 1; id <= iEmploy; id++) {
            m_mapBossId.put(id, 0);
        }
    }

    private static void output() {
        for (Entry entry : m_mapBossId.entrySet()) {
            System.out.println(entry.getValue());
        }
    }
} Main
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Scanner;
import java.util.Map.Entry;

public class Main {

    private static Map<Integer, Integer> m_mapBossId = new LinkedHashMap<Integer, Integer>();

    public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);
        final int iEmployeeNum = Integer.parseInt(sc.next());
        initBossId(iEmployeeNum);

        // 社員番号1が固定でいるため。
        for (int i = 1; i <= iEmployeeNum - 1; i++) {
            final int iBossId = Integer.parseInt(sc.next());
            int iSub = m_mapBossId.get(iBossId);
            iSub++;
            m_mapBossId.put(iBossId, iSub);
        }
        output();
    }

    private static void initBossId(final int iEmploy) {
        for (int id = 1; id <= iEmploy; id++) {
            m_mapBossId.put(id, 0);
        }
    }

    private static void output() {
        for (Entry entry : m_mapBossId.entrySet()) {
            System.out.println(entry.getValue());
        }
    }
}
