let a, b, k, f = Scanf.scanf " %d %d %d" @@ fun a b c -> a, b, c, Printf.printf "%d\n"
let _ = if k >= (b - a + 2) / 2 then for i = a to b do f i done else (for i = a to a + k - 1 do f i done; for i = b - k + 1 to b do f i done)