Scanf.scanf "%d" (fun n ->
    let a = Array.make (n + 1) 0 in
    for i = 2 to n do
        Scanf.scanf " %d" (fun j -> a.(j) <- a.(j) + 1)
    done;
    for i = 1 to n do
        Printf.printf "%d\n" a.(i)
    done
)