#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const int N = 1e5 + 5;
int ans[N];
int main() {
  int n, k;
  while (scanf("%d%d", &n, &k) != EOF) {
    int t = 0;
    for (int i = k; i > 0; --i) {
      if ((k - i) & 1) {
        ans[i] = k - t;
        ++t;
      } else
        ans[i] = t + 1;
    }
    for (int i = k + 1; i <= n; ++i) ans[i] = i;
    for (int i = 1; i <= n; ++i) printf("%d%s", ans[i], i == n ? "\n" : " ");
  }
  return 0;
}
