#include <bits/stdc++.h>
using namespace std;
int main() {
  long a = 1, b, k, n, i;
  cin >> n >> k;
  b = k + 1;
  for (i = 1; i <= k + 1; i++) {
    if (i % 2 != 0)
      cout << a++ << " ";
    else
      cout << b-- << " ";
  }
  for (i = i; i <= n; i++) cout << i << " ";
  return 0;
}
