n=io.read("*n","*l")
t={}
for i=2,n do
    a=io.read("*n")
    if not t[a] then
        t[a]=1
    else
        t[a]=t[a]+1
    end
end

for i=1,n do
    if not t[i] then
        print(0)
    else
        print(t[i])
    end
end