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