(defn input []
  (->> (.split #"\s" (read-line))
    (map #(Integer/parseInt %))))

(defn SmallAndLargeInteger [[A B K]]
  (->> (range A (unchecked-inc-int B))
    ((juxt #(take K %) #(take-last K %)))
    (apply concat)
    distinct
    (map #(println-str %))
    (apply str)))

(->> (input)
  SmallAndLargeInteger
  print)