#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long n, k;
  cin >> n >> k;
  long long s = 1;
  long long e = k + 1;
  for (long long i = 1; i <= k + 1; i++) {
    if (i % 2 == 1) {
      cout << s << " ";
      s++;
    } else {
      cout << e << " ";
      e--;
    }
  }
  s = k + 2;
  for (long long i = k + 2; i <= n; i++) {
    cout << s << " ";
    s++;
  }
}
