import Control.Applicative
import Control.Monad
import Data.List

main :: IO ()
main = do
    ss <- getLine
    w <- readLn :: IO Int
    let f [] = Nothing
        f xs = Just (head xs, drop w xs)
    putStrLn $ unfoldr f ss