#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  vector<int> resp;
  for (int i = 1; i <= k + 1; ++i) {
    if (i % 2)
      resp.push_back((i + 1) / 2);
    else
      resp.push_back(k + 2 - (i / 2));
  }
  for (int i = k + 2; i <= n; ++i) resp.push_back(i);
  for (int i = 0; i < resp.size() - 1; ++i) cout << resp[i] << " ";
  cout << resp[resp.size() - 1] << endl;
}
