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