import java.io.PrintWriter; import java.util.*; import java.util.concurrent.SynchronousQueue; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int k = sc.nextInt(); int upper = 1_000_000_00; int lower = upper - 1; int pre = -1; for (int i = 0; i < n - k; ++i) { if (i % 2 == 0) { System.out.print(upper); pre = upper; ++upper; } else { System.out.print(lower); pre = lower; --lower; } if (i != n - 1) System.out.print(" "); } for (int i = n - k; i < n; ++i) { System.out.print(pre); if (i != n - 1) System.out.print(" "); } System.out.println(); } static void tr(Object... objects) { System.out.println(Arrays.deepToString(objects)); } }