#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, i;
  cin >> n >> k;
  if (k == 1) {
    for (i = 1; i <= n; i++) {
      cout << i << " ";
    }
    return 0;
  }
  int a[100002] = {0};
  int c = 1;
  int l = k;
  i = 1;
  while (c <= n) {
    if (c % 2 == 1) {
      printf("%d ", i);
      c++;
      a[i]++;
      if (c == l + 1) break;
    } else {
      printf("%d ", i + k);
      a[i + k]++;
      k -= 2;
      i++;
      c++;
      if (c == l + 1) {
        break;
      }
    }
  }
  for (i = 1; i <= n; i++) {
    if (!a[i]) cout << i << " ";
  }
  return 0;
}
