#include <bits/stdc++.h>
const int maxn = 1000007;
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  int l = 1, r = n;
  for (int i = 0; i < (int)(n); ++i) {
    if (i < k && i & 1) {
      cout << r << " ";
      --r;
    } else if (i < k && !(i & 1)) {
      cout << l << " ";
      ++l;
    } else if (k & 1) {
      cout << l << " ";
      ++l;
    } else {
      cout << r << " ";
      --r;
    }
  }
  return 0;
}
