main = do [n,k] <- map read . words <$> getLine let ks = concat $ zipWith (\x ys -> map (+x) ys) [0,2..] (repeat [0,2,1,3]) putStrLn $ unwords $ map show $ replicate k 0 ++ take (n-k) ks