let () =
  let r, d, x = Scanf.scanf "%d %d %d\n" (fun a b c -> a, b, c) in
  let rec f x i = if i = 10 then [] else string_of_int (r*x-d) :: f (r*x-d) (i+1) in
  let lst = (f x 0) in List.iter print_endline lst
