let rec make_list a b k i =
    if i = b then [b]
    else if i <= a + k - 1 || b - k + 1 <= i then i :: make_list a b k (i + 1)
    else make_list a b k (i + 1)

let () =
    Scanf.scanf "%d %d %d\n" (fun a b k ->
        List.iter (Printf.printf "%d\n") (make_list a b k a)
    )
