#include <bits/stdc++.h>
using namespace std;
long long n, m, a, b, i, j, s, k;
int main() {
  b = 1;
  a = 1;
  scanf("%lld%lld", &n, &k);
  printf("1 ");
  for (i = k; i > 0; i--)
    if (b) {
      printf("%lld ", a + i);
      b = 0;
      a += i;
    } else {
      printf("%lld ", a - i);
      b = 1;
      a -= i;
    }
  for (i = k + 2; i <= n; i++) printf("%lld ", i);
  return 0;
}
