import java.io.BufferedInputStream; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.*; public class _478 { public static void main(String[] args) throws IOException { new _478().solve(); } void solve() throws IOException { try (final Scanner in = new Scanner(System.in)) { int n = in.nextInt(); int k = in.nextInt(); int m = n - k - 2; System.out.print("0 10000000"); int last = 10000000; for (int i = 0; i < m; i++) { int v = i % 2 == 0 ? (i+1) : 10000000-i; last = v; System.out.print(" " + v); } for (int i = m + 2; i < n; i++) { System.out.print(" " + last); } System.out.println(); } } // for debug static void dump(Object... o) { System.err.println(Arrays.deepToString(o)); } }