#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, l, r;
  scanf("%d%d", &n, &k);
  l = 1, r = n;
  while (k--) {
    if (k % 2 == 0)
      cout << l++ << " ";
    else
      cout << r-- << " ";
  }
  for (int i = l; i <= r; i++) cout << i << " ";
  puts("");
}
