f a b
    | a < b = (show a ++ " " ++ show b):f (a + 1) (b - 1)
    | otherwise = []

main = do
    [n, m] <- map read . words <$> getLine :: IO [Int]
    let n' = div n 2
    let ab = if mod n 2 == 1
        then f 1 n
        else f 1 (n' - 1) ++ f (n' + 1) n
    mapM_ putStrLn $ take m ab
