A company has N members, who are assigned ID numbers 1, ..., N.
Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number.
When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X.
You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has.

-----Constraints-----
 - 2 \leq N \leq 2 \times 10^5
 - 1 \leq A_i < i

-----Input-----
Input is given from Standard Input in the following format:
N
A_2 ... A_N

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

-----Sample Input-----
5
1 1 2 2

-----Sample Output-----
2
2
0
0
0

The member numbered 1 has two immediate subordinates: the members numbered 2 and 3.
The member numbered 2 has two immediate subordinates: the members numbered 4 and 5.
The members numbered 3, 4, and 5 do not have immediate subordinates.
[{"code": "def i_input(): return int(input())\n\n\ndef i_map(): return list(map(int, input().split()))\n\n\ndef i_list(): return list(map(int, input().split()))\n\n\ndef i_row(N): return [int(input()) for _ in range(N)]\n\n\ndef i_row_list(N): return [list(map(int, input().split())) for _ in range(N)]\n\n\nn = i_input()\naa=i_list()\nshain=[0]*n\nfor a in aa:\n    shain[a-1]+=1\nfor s in shain:\n    print(s)\n\n\n", "passed": true, "time": 0.93, "memory": 14172.0, "status": "done"}, {"code": "import collections\n\nn = int(input())\nli = list(map(int,input().split()))\nres = [0]*(n+1)\nfor i in li:\n    res[i]+=1\n# count = collections.Counter(li)\n# print(count)\nfor i in range(1,len(res)):\n    print((res[i]))\n# print(\"0\")\n", "passed": true, "time": 0.14, "memory": 14104.0, "status": "done"}, {"code": "# coding=utf-8\n\ndef __starting_point():\n    N = int(input())\n    li = list(map(int, input().split()))\n\n    ans = [0] * (N+1)\n\n    for i in range(len(li)):\n        ans[li[i]] += 1\n\n    #print(ans)\n\n    for i in range(1, N+1):\n        print((ans[i]))\n\n__starting_point()", "passed": true, "time": 0.15, "memory": 14168.0, "status": "done"}, {"code": "n = int(input())\na = [0, 0] + list(map(int, input().split()))\n\nno_buka = [0 for _ in range(n + 1)]\n\nfor i in range(2, n + 1):\n    no_buka[a[i]] += 1\n\nfor j in range(1, n + 1):\n    print((no_buka[j]))\n", "passed": true, "time": 0.31, "memory": 14248.0, "status": "done"}, {"code": "n = int(input())\nA = list(map(int, input().split()))\n\nans = [0] * n\n\nfor a in A:\n    ans[a-1] += 1\n\nfor i in ans:\n    print(i)", "passed": true, "time": 0.33, "memory": 14284.0, "status": "done"}, {"code": "import re\nimport sys\nimport math\nimport itertools\nimport bisect\nfrom copy import copy\nfrom collections import deque,Counter\nfrom decimal import Decimal\nimport functools\ndef v(): return input()\ndef k(): return int(input())\ndef S(): return input().split()\ndef I(): return list(map(int,input().split()))\ndef X(): return list(input())\ndef L(): return list(input().split())\ndef l(): return list(map(int,input().split()))\ndef lcm(a,b): return a*b//math.gcd(a,b)\nsys.setrecursionlimit(10 ** 6)\nmod = 10**9+7\ncnt = 0\nans = 0\ninf = float(\"inf\")\nal = \"abcdefghijklmnopqrstuvwxyz\"\nAL = al.upper()\n\nn=k()\nl=l()\na=[]\nfor i in range(n):\n  a.append(0)\nfor i in range(n-1):\n  a[l[i]-1]+=1\nfor i in range(n):\n  print((a[i]))\n", "passed": true, "time": 0.15, "memory": 14296.0, "status": "done"}, {"code": "N = int(input())\narray = list(map(int,input().split()))\nans = [0]*N\nfor i in array:\n  ans[i-1] += 1\n\nfor i in range(N):\n  print( ans[i] )", "passed": true, "time": 0.14, "memory": 14336.0, "status": "done"}, {"code": "n = int(input())\na = list(map(int, input().split()))\nl = [0] * (n+1)\n\nfor i in a:\n    l[i] += 1\n\nfor i in range(1,n+1):\n    print(l[i])", "passed": true, "time": 0.2, "memory": 14276.0, "status": "done"}, {"code": "n = int(input())\na = list(map(int, input().split()))\na.append(0)\na.sort()\n\nflg = [0 for i in range(n)]\nfor i in range(n):\n    flg[a[i]] += 1\nfor i in range(n-1):\n    print(flg[i+1])\n\nprint(0)", "passed": true, "time": 0.14, "memory": 14184.0, "status": "done"}, {"code": "import collections as c\nn=int(input());t=c.Counter(map(int,input().split()))\nfor i in range(1,n+1): print([0,t[i]][i in t]) ", "passed": true, "time": 0.14, "memory": 14176.0, "status": "done"}, {"code": "from collections import Counter\n\nN = int(input())\nA = list([int(x) for x in input().split()])\n\nresult = dict(Counter(A))\n\nfor i in range(1, N+1):\n    if i in result:\n        print((result[i]))\n    else:\n        print((0))\n\n", "passed": true, "time": 0.14, "memory": 14276.0, "status": "done"}, {"code": "N = int(input())\nA = list(map(int,input().split()))\nans = [0] * N\nfor i in range(N-1):\n    ans[A[i] - 1] += 1\nfor i in range(N):\n    print(ans[i])", "passed": true, "time": 0.23, "memory": 14236.0, "status": "done"}, {"code": "N = int(input())\nA = list(map(int, input().split()))\n\nlis = [0] * N\nfor i in range(N - 1):\n    lis[(A[i] - 1)] += 1\n\nfor i in range(N):\n    print((lis[i]))\n", "passed": true, "time": 0.14, "memory": 14248.0, "status": "done"}, {"code": "n = int(input())\nA = list(map(int,input().split()))\nfor i in range(n-1) :\n    A[i] = A[i] - 1\nres = [[] for i in range(n)]\n\nfor i in range(n-1) :\n    res[A[i]].append(i)\n\nfor i in range(n) :\n    print(len(res[i]))", "passed": true, "time": 0.15, "memory": 14284.0, "status": "done"}, {"code": "N = int(input())\ndct = {}\nA = list(map(int, input().split()))\nfor a in A:\n    if a in dct.keys():\n        dct[a] += 1\n    else:\n        dct[a] = 1\nfor n in range(1, N+1):\n    print(dct.get(n, 0))", "passed": true, "time": 0.23, "memory": 14208.0, "status": "done"}, {"code": "n=int(input())\na=list(map(int,input().split()))\nans=[0]*(n+1)\n\nfor i in range(n-1):\n    ans[a[i]]+=1\nans.pop(0)\nfor j in ans:\n    print(j)", "passed": true, "time": 0.14, "memory": 14212.0, "status": "done"}, {"code": "N = int(input())\nA = list(map(int,input().split()))\nans_list = [0]*N\n\nfor i in range(N-1):\n  ans_list[A[i]-1] += 1\n  \nfor j in range(N):\n  print(ans_list[j])", "passed": true, "time": 0.14, "memory": 14204.0, "status": "done"}, {"code": "N=int(input())\nA=list(map(int,input().split()))\nA_count=[0]*N\nfor i in range(N-1):\n    A_count[A[i-1]-1]+=1\nfor i in range(N):\n    print(A_count[i])", "passed": true, "time": 0.14, "memory": 14216.0, "status": "done"}, {"code": "N = int(input())\nA = [0]*(N)\nfor i in input().split():\n    A[int(i)-1] = A[int(i)-1]+1\nfor i in A:\n    print(i)\n", "passed": true, "time": 0.15, "memory": 14300.0, "status": "done"}, {"code": "N=int(input())\nA=list(map(int,input().split()))\ncnt=[0 for i in range(N)]\nfor i in range(N-1):\n    cnt[A[i]-1]+=1\nfor i in range(N):\n    print((cnt[i]))\n", "passed": true, "time": 0.22, "memory": 14176.0, "status": "done"}, {"code": "def main():\n    N = int(input())\n    A = list(map(int,input().split()))\n    list_a = [0]*N\n    for i in range(len(A)):\n        list_a[A[i]-1] += 1\n\n    for i in range(N):\n        print((list_a[i]))\n\nmain()\n", "passed": true, "time": 0.14, "memory": 14060.0, "status": "done"}, {"code": "n={i+1:0 for i in range(int(input()))}\nfor i in map(int,input().split()): n[i]+=1\n[print(i) for i in n.values()]", "passed": true, "time": 0.14, "memory": 14216.0, "status": "done"}, {"code": "n = int(input())\na = list(map(int,input().split()))\n\nb = [0]*n\n\nfor i in range(len(a)):\n    b[a[i]-1] += 1\n\nfor i in range(n):\n    print((b[i]))\n", "passed": true, "time": 0.14, "memory": 14272.0, "status": "done"}, {"code": "import sys\nreadline = sys.stdin.readline\n\nN = int(readline())\nA = list(map(int,readline().split()))\n\nans = [0] * N\n\nfor i in range(len(A)):\n  ans[A[i] - 1] += 1\n  \nfor a in ans:\n  print(a)", "passed": true, "time": 0.14, "memory": 14020.0, "status": "done"}, {"code": "N = int(input())\nA = [int(i) for i in input().split()]\nans = [0]*N\nfor i in range(N-1):\n    ans[A[i]-1] += 1\nfor i in ans:\n    print(i)", "passed": true, "time": 0.14, "memory": 14068.0, "status": "done"}, {"code": "# import math\n# import statistics\na=int(input())\n#b,c=int(input()),int(input())\n# c=[]\n# for i in a:\n#    c.append(i)\n# e1,e2 = map(int,input().split())\nf = list(map(int,input().split()))\n#g = [input() for _ in range(a)]\n\nf.sort()\ncount=1\nans=[0 for i in range(a)]\n\nfor i in range(len(f)-1):\n    if f[i]==f[i+1]:\n        count+=1\n    else:\n        ans[f[i]-1]=count\n        count=1\nif count>=1:\n    ans[f[-1]-1]=count\nfor i in ans:\n    print(i)", "passed": true, "time": 0.14, "memory": 14100.0, "status": "done"}, {"code": "B=[0]*int(input())\nfor a in map(int,input().split()):B[a-1]+=1\nfor b in B:print(b)", "passed": true, "time": 0.14, "memory": 14248.0, "status": "done"}, {"code": "N = int(input())\nA = list(map(int, input().split()))\n\nresult = [0] * N\n\nfor a in A:\n  result[a-1] += 1\n  \nfor i in range(N):\n  print((result[i]))\n", "passed": true, "time": 0.14, "memory": 14284.0, "status": "done"}, {"code": "N=int(input())\nA=list(map(int,input().split()))\nB=[0]*N\nfor i in range(0,N-1):\n  B[A[i]-1]+=1\n\nfor i in range(N):\n  print((B[i]))\n", "passed": true, "time": 0.14, "memory": 14248.0, "status": "done"}, {"code": "# Begin Header {{{\nfrom math import gcd\nfrom collections import Counter, deque, defaultdict\nfrom heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge\nfrom bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort\nfrom itertools import accumulate, product, permutations, combinations, combinations_with_replacement\n# }}} End Header\n# _________\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u306f\u3053\u3053\u304b\u3089\uff01\uff01___________\nn = int(input())\nA = list(map(int, input().split()))\nb = [0]*(n+1)\nfor i in A:\n    b[i]+=1\nfor i in range(1, n+1):\n    print((b[i]))\n", "passed": true, "time": 0.23, "memory": 14256.0, "status": "done"}, {"code": "from collections import Counter\nN = int(input())\nA = list(map(int, input().split()))\nC = Counter(A)\nfor i in range(1, N+1):\n    print(C[i])", "passed": true, "time": 0.14, "memory": 14316.0, "status": "done"}, {"code": "import copy\nn=int(input())\nA=list(map(int,input().split()))\nL=[0]*n\n\nfor x in A:\n    L[x-1] += 1\nfor i in L:\n    print(i)\n", "passed": true, "time": 0.15, "memory": 14100.0, "status": "done"}, {"code": "import collections\n\n\ndef main() -> None:\n    n = int(input())\n    boss_dict = collections.Counter(tuple(map(int, input().split())))\n\n    for i in range(n):\n        print((boss_dict[i+1] if boss_dict[i+1] else 0))\n\n    return\n\n\ndef __starting_point():\n    main()\n\n__starting_point()", "passed": true, "time": 0.14, "memory": 14084.0, "status": "done"}, {"code": "n = int(input())\na = list(map(int,input().split()))\nc=[0]*n\nfor i in a:\n    c[i-1] +=1\nfor i in c:\n    print(i)", "passed": true, "time": 0.31, "memory": 14180.0, "status": "done"}, {"code": "import collections\nN = int(input())\na = list(map(int, input().split()))\nl = [0]* N\n\nfor i in range(N-1):\n    #print(i, a[i]-1)\n    l[a[i]-1] += 1\n#print(l)\nfor j in range(N):\n    print((l[j]))\n", "passed": true, "time": 0.32, "memory": 14140.0, "status": "done"}, {"code": "from typing import List\n\n\ndef answer(n: int, a: List[int]) -> List[int]:\n    result = [0] * n\n    for i in a:\n        result[i - 1] += 1\n    return result\n\n\ndef main():\n    n = int(input())\n    a = list(map(int, input().split()))\n    for i in answer(n, a):\n        print(i)\n\n\ndef __starting_point():\n    main()\n__starting_point()", "passed": true, "time": 0.22, "memory": 15408.0, "status": "done"}, {"code": "import collections\n\nN=int(input())\nA=list(map(int,input().split()))\nc=collections.Counter(A)\n\nfor i in range(1,N+1):\n    print((c[i]))\n", "passed": true, "time": 0.31, "memory": 14212.0, "status": "done"}, {"code": "def calc(n, m):\n    import collections\n    edict = dict()\n    for i in range(1, len(m) + 2):\n        edict[i] = []\n    for j in range(len(m)):\n        edict[m[j]].append(j)\n    for k in edict:\n        print((len(edict[k])))\n\n\ndef main():\n    n = int(input())\n    employees = list(int(v) for v in input().split())\n    return calc(n, employees)\n\n\ndef __starting_point():\n    main()\n\n__starting_point()", "passed": true, "time": 0.14, "memory": 14136.0, "status": "done"}, {"code": "n = int(input())\nalst = list(map(int, input().split()))\nans = [0 for _ in range(n)]\nfor a in alst:\n  ans[a - 1] += 1\nprint(*ans, sep = \"\\n\")", "passed": true, "time": 0.19, "memory": 14248.0, "status": "done"}, {"code": "n = int(input())\nans = [0] * n\na = list(map(int, input().split()))\nfor i in range(n - 1):\n    ans[a[i] - 1] += 1\nprint(*ans, sep='\\n')\n", "passed": true, "time": 0.2, "memory": 14384.0, "status": "done"}, {"code": "n=int(input())\nl=list(map(int,input().split()))\na=[]\nfor i in range(n):\n  a.append(0)\nfor i in range(n-1):\n  a[l[i]-1]+=1\nfor i in range(n):\n  print(a[i])", "passed": true, "time": 0.17, "memory": 14368.0, "status": "done"}, {"code": "n = int(input())\na = list(map(int, input().split()))\nans = [0 for _ in range(n)]\nfor i in a:\n    ans[i-1] += 1\n\nfor m in ans:\n    print(m)\n", "passed": true, "time": 0.18, "memory": 14296.0, "status": "done"}, {"code": "# author:  Taichicchi\n# created: 12.09.2020 19:50:20\n\nfrom collections import Counter\nimport sys\n\nN = int(input())\n\nA = list(map(int, input().split()))\n\n\nc = Counter(A)\n\nfor i in range(N):\n    print((c[i + 1]))\n", "passed": true, "time": 0.14, "memory": 14192.0, "status": "done"}, {"code": "N = int(input())\nA = list(map(int, input().split()))\n\nans = [0] * N\n\nfor i in range(N - 1):\n\tans[A[i] - 1] += 1\nfor i in range(N):\n\tprint(ans[i])", "passed": true, "time": 0.14, "memory": 14000.0, "status": "done"}, {"code": "n=[0]*int(input())\nfor i in map(int,input().split()): n[i-1]+=1\nprint(*n,sep=\"\\n\")    ", "passed": true, "time": 0.14, "memory": 14200.0, "status": "done"}, {"code": "import sys\nimport math\nfrom collections import defaultdict, deque, Counter\nfrom copy import deepcopy\nfrom bisect import bisect, bisect_right, bisect_left\nfrom heapq import heapify, heappop, heappush\n    \ninput = sys.stdin.readline\ndef RD(): return input().rstrip()\ndef F(): return float(input().rstrip())\ndef I(): return int(input().rstrip())\ndef MI(): return map(int, input().split())\ndef MF(): return map(float,input().split())\ndef LI(): return list(map(int, input().split()))\ndef TI(): return tuple(map(int, input().split()))\ndef LF(): return list(map(float,input().split()))\ndef Init(H, W, num): return [[num for i in range(W)] for j in range(H)]\n    \n    \ndef main():\n    N = I()\n    L = LI()\n    D = [0]*N\n\n    for index, num in enumerate(L[::-1]):\n        D[num-1]+=1\n    for i in D:\n        print(i)\n    \ndef __starting_point():\n    main()\n__starting_point()", "passed": true, "time": 0.14, "memory": 14148.0, "status": "done"}, {"code": "n=int(input())\nans=[0]*n\nl=list(map(int,input().split()))\nfor i in range(n-1):\n    ans[l[i]-1]+=1\nfor i in range(n):\n    print(ans[i])", "passed": true, "time": 0.14, "memory": 14136.0, "status": "done"}, {"code": "N = int(input())\nA = [0] * 2 + list(map(int, input().split()))\n\nl = [0] * (N + 1)\nfor i in range(2, N + 1):\n    l[A[i]] += 1\n\nfor i in range(1, N + 1):\n    print((l[i]))\n", "passed": true, "time": 0.14, "memory": 14176.0, "status": "done"}, {"code": "n = int(input())\na = list(map(int,input().split()))\n\nemp = [0]*(n+1)\n\nfor i in range(len(a)):\n    emp[a[i]] += 1\n\nfor i in range(1,n+1):\n    print((emp[i]))\n", "passed": true, "time": 0.14, "memory": 14044.0, "status": "done"}, {"code": "import sys\n\ninput = sys.stdin.readline\nN = int(input())\nA = list(map(int, input().split()))\n\nans = [0] * N\nfor a_i in A:\n    ans[a_i-1] += 1\n\nfor a in ans:\n    print(a)", "passed": true, "time": 0.14, "memory": 14344.0, "status": "done"}, {"code": "from collections import Counter\n\nn = int(input())\na = list(map(int,input().split()))\n\ns = Counter(a)\n\nfor i in range(1,n+1):\n    print(s[i])", "passed": true, "time": 0.14, "memory": 14308.0, "status": "done"}, {"code": "n = int(input())\n\nA = list(map(int, input().split()))\n\nB = [0 for i in range(n)]\nfor i in range(n-1):\n    B[A[i]-1] += 1\nfor i in range(n):\n    print (B[i])", "passed": true, "time": 0.14, "memory": 14012.0, "status": "done"}, {"code": "import collections as c\nn,t=int(input()),c.Counter(map(int,input().split()))\nfor i in range(1,n+1): print([0,t[i]][i in t])", "passed": true, "time": 0.14, "memory": 14300.0, "status": "done"}, {"code": "n = int(input())\na =list(map(int,input().split()))\nb = sorted(a)\nc = [0]*n\nfor i in range(0,n-1):\n  c[a[i]-1]+=1\nfor i in range(n):\n  print(c[i])", "passed": true, "time": 0.14, "memory": 14204.0, "status": "done"}, {"code": "n = int(input())\nA = list(map(int, input().split()))\nli = [0]*(n+1)\nfor i in range(n-1):\n    b = A[i]-1\n    li[b]+=1\nfor i in range(n):\n    print(li[i])", "passed": true, "time": 0.14, "memory": 14248.0, "status": "done"}, {"code": "n = int(input())\na = [int(s) for s in input().split()]\nb = [0] * n\nfor i in a:\n    b[i - 1] += 1\n\nfor i in b:\n    print(i)", "passed": true, "time": 0.23, "memory": 14116.0, "status": "done"}, {"code": "n = int(input())\na = list(map(int, input().split()))\nnumber_buka = [0]*n\n\nfor i in a:\n    number_buka[i-1] += 1\n\nfor j in number_buka:\n    print(j) ", "passed": true, "time": 0.14, "memory": 14072.0, "status": "done"}, {"code": "N = int(input())\nA = list(map(int, input().split()))\nanswer = [0] * N\n\nfor i in A:\n  answer[i-1] += 1\n\nfor n in answer:\n  print(n)", "passed": true, "time": 0.14, "memory": 14052.0, "status": "done"}, {"code": "n = int(input())\nemployees = input().split(\" \")\nemployees_changed = []\nfor i in range(0, len(employees)):\n\temployees_changed.append(int(employees[i]))\n\nans = [0] * (n+1)\nfor x in employees_changed:\n\tans[x] += 1\n\nfor i in range(1, n+1, 1):\n  print((ans[i]))\n# Compotitive Programming\n", "passed": true, "time": 0.14, "memory": 14336.0, "status": "done"}, {"code": "N = int(input())\nA = list(map(int, input().split()))\n\nans = [0] * N\n\nfor i in A:\n    ans[i-1] += 1\n\nfor j in ans:\n    print(j)", "passed": true, "time": 0.14, "memory": 14076.0, "status": "done"}, {"code": "n=int(input())\na=list(map(int,input().split()))\nc=[0 for _ in range(n)]\nfor i in range(len(a)):\n  c[a[i]-1]+=1\nfor j in range(len(c)):\n  print((c[j]))\n  \n", "passed": true, "time": 0.14, "memory": 14256.0, "status": "done"}, {"code": "def resolve():\n    n = int(input())\n    ans = [0]*n\n    a = list(map(int,input().split()))\n    for i in a:\n        ans[i-1] += 1\n    for i in ans:\n        print(i)\nresolve()", "passed": true, "time": 0.14, "memory": 14292.0, "status": "done"}, {"code": "n = int(input())\na = list(map(int, input().split()))\n\nans = [0] * n\n\nfor x in a:\n    ans[x-1] += 1\n\n\nfor x in ans:\n    print(x)", "passed": true, "time": 0.21, "memory": 14300.0, "status": "done"}, {"code": "N = int(input())\nA = list(map(int, input().split()))\nbuka = [0]*N\nfor a in A:\n  buka[a-1] += 1\nfor x in buka:\n  print(x)", "passed": true, "time": 0.14, "memory": 14184.0, "status": "done"}, {"code": "N = int(input())\nA = list(map(int,input().split()))\n\nANS = []\nfor i in range(N):\n    ANS.append(0)\n\n\nfor i in range(N-1):\n   ANS[A[i]-1] += 1\n\nfor i in range(N):\n    print(ANS[i])", "passed": true, "time": 0.23, "memory": 14124.0, "status": "done"}, {"code": "n=int(input())\nw=list(map(int,input().split()))\na=[0]*(n)\n\nfor i in range(n-1):\n    a[w[i]-1]+=1\n\nfor j in range(n):\n    print(a[j])", "passed": true, "time": 0.14, "memory": 14144.0, "status": "done"}, {"code": "n = int(input())\na = [int(x) for x in input().split()]\nm = {i : 0 for i in range(1, n+1)}\n\nfor i, x in enumerate(a):\n  m[x] += 1\n\nfor x in range(1, n+1):\n  print(m[x])", "passed": true, "time": 0.15, "memory": 14044.0, "status": "done"}, {"code": "num = int(input())\ntable = list(map(int, input().split()))\ntable2 = []\nfor i in range(num):\n    table2.append(0)\n\nfor j in range(len(table)):\n    table2[table[j]-1] += 1\n\nfor k in table2:\n    print(k)\n", "passed": true, "time": 0.24, "memory": 14140.0, "status": "done"}, {"code": "n=int(input())\na=list(map(int,input().split()))\n\nc=[0]*n\n\nfor i in range(len(a)):\n    c[a[i]-1]=c[a[i]-1]+1\n\nfor i in c:\n    print(i)", "passed": true, "time": 0.24, "memory": 14348.0, "status": "done"}, {"code": "n = int(input())\na = list(map(int,input().split()))\n\nb = [0]*n\n\nfor i in range(n-1):\n    b[a[i]-1] += 1\n\nfor j in range(len(b)):\n    print((b[j]))\n", "passed": true, "time": 0.15, "memory": 14116.0, "status": "done"}, {"code": "n = int(input())\na = list(map(int, input().split()))\nl = [0] * n\nfor i in range(n-1):\n    l[a[i]-1] += 1\nfor i in range(n):\n    print(l[i])", "passed": true, "time": 0.14, "memory": 14252.0, "status": "done"}, {"code": "n = int(input())\na = [0] + list(map(int,input().split()))\nl = [0]*n\nfor i in a:\n    l[i-1] += i\nfor j in range(n):\n    l[j] = int(l[j]/(j+1))\nfor k in l:\n    print(k,end=\"\\n\")", "passed": true, "time": 0.14, "memory": 14304.0, "status": "done"}, {"code": "n = int(input())\na = list(map(int, input().split()))\n\nans = [0] * (n+1)\n\nfor x in a:\n  ans[x] += 1\n\nfor i in range(1, n+1, 1):\n  print((ans[i]))\n", "passed": true, "time": 0.14, "memory": 14112.0, "status": "done"}, {"code": "n = int(input())\na = list(map(int,input().split()))\nans = [0 for i in range(n)]\nfor i in a:\n    ans[i-1] += 1\nfor i in ans:\n    print(i)", "passed": true, "time": 0.15, "memory": 14088.0, "status": "done"}, {"code": "n = int(input())\na = list(map(int, input().split()))\nd = dict()\nfor i in range(n):\n    d[i] = 0\nfor e in a:\n    d[e-1] += 1\nfor i in range(n):\n    print(d[i])", "passed": true, "time": 0.14, "memory": 14348.0, "status": "done"}, {"code": "n = int(input())\n\na = [0 for _ in range(n-1)]\na = [int(s) for s in input().split()]\n\nd = {}\n\nfor i in range(n-1):\n    boss = a[i]\n    d[boss] = d.setdefault(boss,0) + 1\n\nfor i in range(n):\n    ans = d.setdefault(i+1,0)\n    print(ans)\n\n\n", "passed": true, "time": 0.24, "memory": 14220.0, "status": "done"}, {"code": "N = int(input())\nhie_list = list(map(int, input().split()))\n\nhie_dic = {}\n\nfor i in range(N - 1):\n    hie_dic[i + 1] = 0\n    hie_dic[hie_list[i]] += 1\n\nfor i in range(N - 1):\n    print(hie_dic[i + 1])\nprint(0)", "passed": true, "time": 0.24, "memory": 13992.0, "status": "done"}, {"code": "import collections\nn = int(input())\na = list(map(int,input().split()))\nc = collections.Counter(a)\nfor i in range(1, n+1):\n    print(c[i])", "passed": true, "time": 0.14, "memory": 14124.0, "status": "done"}, {"code": "n = int(input())\na = list(map(int,input().split()))\nfrom collections import Counter\nl = Counter(a)\nfor i in range(n):\n  print(l[i+1])", "passed": true, "time": 0.14, "memory": 14256.0, "status": "done"}, {"code": "N = int(input())\nA = list(map(int, input().split()))\n\nans = [0 for _ in range(N)]\n\nfor a in A:\n  ans[a-1] += 1\nfor i in ans:\n  print(i)", "passed": true, "time": 0.14, "memory": 14056.0, "status": "done"}, {"code": "import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time, copy,bisect\n#from operator import itemgetter\n#from heapq import heappush, heappop\n#import numpy as np\n#from scipy.sparse.csgraph import shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson\n#from scipy.sparse import csr_matrix\n#from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN\nimport sys\n\nsys.setrecursionlimit(10**7)\ninf = 10**20\nmod = 10**9 + 7\n\nstdin = sys.stdin\n\nni = lambda: int(ns())\nnf = lambda: float(ns())\nna = lambda: list(map(int, stdin.readline().split()))\nnb = lambda: list(map(float, stdin.readline().split()))\nns = lambda: stdin.readline().rstrip()  # ignore trailing spaces\n\nN = ni()\nA = na()\nd = collections.Counter(A)\nfor i in range(1, N+1):\n    print(d[i])", "passed": true, "time": 0.15, "memory": 14272.0, "status": "done"}, {"code": "#ABC163\nimport collections\nN=int(input())\nA =list(map(int,input().split()))\nc = collections.Counter(A)\nfor i in range(N):\n    print(c[i+1])", "passed": true, "time": 0.14, "memory": 14312.0, "status": "done"}, {"code": "n = int(input())\naa = [0]+list(map(int, input().split()))\nbuka = [0]*n\n\nfor i in range(1, n):\n  buka[aa[i]-1] += 1\n\nfor i in range(n):\n  print(buka[i])", "passed": true, "time": 0.14, "memory": 14244.0, "status": "done"}, {"code": "n=[0]*int(input())\nfor i in map(int,input().split()): n[i-1]+=1\nprint(*n,sep='\\n')", "passed": true, "time": 0.14, "memory": 14108.0, "status": "done"}, {"code": "def __starting_point():\n\n    n = int(input())\n    A = list(map(int,input().split()))\n\n    B = [0]*n\n    for a in A:\n        B[a-1] += 1\n    for b in B:\n        print(b)\n\n\n__starting_point()", "passed": true, "time": 0.14, "memory": 14276.0, "status": "done"}, {"code": "N = int(input())\nA = list(map(int,input().split()))\n#A.reverse()\nans = [0 for _ in range(N)]\nfor i in reversed(range(N-1)):\n  #\u4ecai\u756a\u76ee(0index)\u306e\u793e\u54e1\n  boss = A[i]-1 #0index\n  ans[boss] += 1\n  #print(ans,i,boss)\nfor x in ans:\n  print(x)", "passed": true, "time": 0.14, "memory": 14360.0, "status": "done"}, {"code": "n = int(input())\nA = list(map(int,input().split()))\nL = [0]*n\nfor i in range(n-1):\n  L[A[i]-1] += 1\nfor l in L:\n  print(l)", "passed": true, "time": 0.14, "memory": 14088.0, "status": "done"}]