open Printf
open Scanf

let id x = x

let solve n =
  let ar = Array.make n 0 in
  let l = List.init (n - 1) @@ fun _ -> scanf "%d " id in
  List.iter (fun i -> ar.(i-1) <- ar.(i-1) + 1) l;
  Array.iter (printf "%d\n") ar
             
let () =
  scanf "%d " solve
