#include <bits/stdc++.h>
using namespace std;
int n, k, t[100005];
int main() {
  int p, i, x;
  cin >> n >> k;
  p = k + 1;
  x = p;
  for (i = p; i >= 1; i -= 2) {
    t[i] = x;
    --x;
  }
  if (i == 0)
    for (i = 1; i <= p; i += 2) {
      t[i] = x;
      x--;
    }
  else
    for (i = 2; i <= p; i += 2) {
      t[i] = x;
      x--;
    }
  for (i = p + 1; i <= n; ++i) t[i] = i;
  for (i = 1; i <= n; ++i) cout << t[i] << " ";
  cout << "\n";
  return 0;
}
