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