#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, k, k1, n, tmp;
  while (scanf("%d%d", &n, &k) == 2) {
    bool flag = 1;
    k1 = k;
    tmp = 1;
    printf("1");
    while (k1 > 0) {
      if (flag)
        tmp += k1;
      else
        tmp -= k1;
      printf(" %d", tmp);
      flag = !flag;
      k1--;
    }
    for (i = k + 2; i <= n; i++) {
      printf(" %d", i);
    }
    printf("\n");
  }
}
