#include <bits/stdc++.h>
int main() {
  int n, k;
  std::cin >> n >> k;
  printf("1");
  for (int i = 2; i <= k + 1; ++i) {
    if (i % 2 == 0)
      printf(" %d", k + 1 - i / 2 + 1);
    else
      printf(" %d", i / 2 + 1);
  }
  for (int i = k + 2; i <= n; ++i) printf(" %d", i);
  putchar('\n');
}
