#include <bits/stdc++.h>
using namespace std;
;
struct _dbg {
  template <class T>
  _dbg& operator,(const T& v) {
    cerr << v << " ";
    return *this;
  };
};
_dbg _d;
int main() {
  int N, K, i = 0;
  cin >> N >> K;
  for (; i < N - K; ++i) cout << i + 1 << ' ';
  for (int j = 0, _j = (K); j < _j; ++j) cout << (j & 1 ? ++i : N--) << ' ';
};
