#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  int n, k;
  cin >> n >> k;
  int nw = 1;
  int start, step;
  int mul = 1;
  step = k;
  nw = 1;
  for (int i = 0; i <= k; i++) {
    cout << nw << ' ';
    nw += step * mul;
    step--;
    mul *= -1;
  }
  for (int j = k + 2; j <= n; j++) cout << j << ' ';
}
