import java.util.Scanner; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(), k = sc.nextInt(), min = 0, max = 1000000000, tmp = 1; sc.close(); for (int i = 0; i < n; ++i) { if (k > i) { System.out.print(min); ++min; } else { if (tmp == 1) { System.out.print(min); ++min; } else { System.out.print(max); --max; } tmp ^= 1; } if (i != n - 1) System.out.print(" "); } } }