#include <bits/stdc++.h>
using namespace std;
const int eps = 1e-8;
const int INF = 1000000000;
const int maxn = 100000 + 10;
int n, k;
int main() {
  scanf("%d%d", &n, &k);
  k++;
  int ss = k + 1;
  int index = 1, ji = 1, ou = k;
  while (k--) {
    if (index == 1) {
      index = 0;
      printf("%d ", ji++);
    } else {
      index = 1;
      printf("%d ", ou--);
    }
  }
  if (ss <= n) {
    for (int i = ss; i < n; i++) {
      printf("%d ", i);
    }
    printf("%d\n", n);
  }
  return 0;
}
