#include <bits/stdc++.h>
using namespace std;
int main() {
  long n, k, mid, incr, i, sign;
  scanf("%ld %ld", &n, &k);
  if ((k + 1) % 2 == 0) {
    mid = (k + 1) / 2;
    sign = 1;
  } else {
    mid = (k + 1) / 2 + 1;
    sign = -1;
  }
  printf("%ld ", mid);
  incr = 1;
  long num;
  for (i = 1; i <= k; i++) {
    num = mid + sign * incr;
    printf("%ld ", num);
    sign *= -1;
    incr++;
    mid = num;
  }
  num++;
  for (i = k + 1; i < n; i++) {
    printf("%ld ", num);
    num++;
  }
  return 0;
}
