let read_int_array n = Array.init n (fun _ -> Scanf.scanf " %d" (fun x -> x))

let n = read_int()

let a = read_int_array (n - 1)

let b = Array.make n 0

let () =
  Array.iter (fun i -> b.(i - 1) <- b.(i - 1) + 1) a;
  Array.iter (fun i -> Printf.printf "%d\n" i) b
