#include <bits/stdc++.h>
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  int d = 1;
  int c = k + 1;
  for (int i = 1; i <= k + 1; i++) {
    if (i % 2 == 1) {
      printf("%d ", d);
      d += 1;
    } else {
      printf("%d ", c);
      c -= 1;
    }
  }
  for (int i = k + 2; i <= n; i++) {
    printf("%d ", i);
  }
}
