let rec seq a b = if a >= b then [] else a :: seq (a+1) b

let () = Scanf.scanf "%d %d %d" @@ fun a b k ->
  List.iter (Printf.printf "%d\n") @@
    if (b - a + 1) >= 2*k then
      seq a (a+k) @ seq (b-k+1) (b+1)
    else
      seq a (b+1)