#include <bits/stdc++.h>
int main() {
  int n, k, i, j;
  scanf("%d %d", &n, &k);
  i = 1;
  while (i <= k / 2 + 1) {
    if (i < k - i + 2)
      printf("%d %d ", i, k - i + 2);
    else
      printf("%d ", i);
    i++;
  }
  for (j = k + 2; j <= n; j++) printf("%d ", j);
  return 0;
}
