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