import Data.List

printList [] = putStr ""
printList (x:xs) = do
  print x
  printList xs

side 0 _  = ([],[])
side _ [] = ([],[])
side k ns = (head ns : pre1, last ns : pre2)
  where (pre1, pre2) = side (k-1) $ tail $ init ns

main = do
  [a,b,k] <- words <$> getLine
  let (a', b', k') = (read a, read b, read k) :: (Int, Int, Int)
      (fst, snd) = side k' [a'..b']
      nums = fst ++ reverse snd
  printList nums