let solve a b c = let max_n = (c + b) / a in let rec solve_core n = if n > max_n then [] else if n * a - b = c || b * a - b <= 0 && n * a = c then n :: solve_core (n+1) else solve_core (n+1) in solve_core 1 let rec print_list = function [] -> () | a :: rest -> print_endline (string_of_int a); print_list rest let _ = let a, b, c = Scanf.scanf "%d %d %d" (fun a b c -> a, b, c) in let ans = solve a b c in if List.length ans > 0 then print_list ans else print_endline "-1"