#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  vector<int> v;
  for (int i = 0; i < n - k + 1; i++) v.push_back(i);
  int mi = 0, ma = v.back();
  for (int i = n - k + 1, j = 0; i < n; i++, j++) {
    if (j % 2) {
      ++ma;
      v.push_back(ma);
    } else {
      --mi;
      v.push_back(mi);
    }
  }
  for (int i = 0; i < (int)(n); ++i) v[i] -= mi - 1;
  for (int i = 0; i < (int)(v.size()); ++i) {
    if (i > 0) printf(" ");
    printf("%d", v[i]);
  }
  printf("\n");
  return 0;
}
