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