#include <bits/stdc++.h>
using namespace std;
int a[100004];
int main() {
  int i = 1, j, n, k, temp;
  cin >> n >> k;
  j = k + 1;
  temp = n;
  while (n--) {
    if (i <= temp) {
      if (a[i] != 1) cout << i << " ", a[i] = 1;
      i++;
    }
    if (j > 1) {
      if (a[j] != 1) cout << j << " ", a[j] = 1;
      j--;
    }
  }
}
