#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  long long i, n, k, m = 0, z, qqqq;
  cin >> n >> k;
  long long arr[n];
  qqqq = k + 1;
  for (i = 1;; i++) {
    arr[m++] = i;
    if (m == k) break;
    arr[m++] = qqqq--;
    if (m == k) break;
  }
  qqqq++;
  for (z = i + 1; z <= n; z++) {
    if ((z < qqqq) || (z > k + 1)) arr[m++] = z;
  }
  for (i = 0; i <= n - 1; i++) cout << arr[i] << " ";
  ;
  return 0;
}
