import java.util.*; public class Main { public static void main (String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int k = sc.nextInt(); int max = 1000000000; int min = 0; int prev = 0; StringBuilder sb = new StringBuilder(); for (int i = 0; i < n; i++) { if (i != 0) { sb.append(" "); } if (i < n - k) { if (i % 2 == 0) { prev = min + i; } else { prev = max - i; } } sb.append(prev); } System.out.println(sb); } }