#include <bits/stdc++.h>
using namespace std;
int main() {
  int v[100005] = {0};
  int n, k;
  cin >> n >> k;
  cout << "1 ";
  int i = 1;
  v[1] = 1;
  bool ok = true;
  while (k) {
    if (ok) {
      cout << i + k << " ", v[i + k] = 1, i = i + k;
    } else {
      cout << i - k << " ", v[i - k] = 1, i -= k;
    }
    k--;
    ok = !ok;
  }
  for (int j = 2; j <= n; j++) {
    if (!v[j]) cout << j << " ";
  }
  return 0;
}
