#include <bits/stdc++.h>
using namespace std;
void maxp(int x) {
  int l = 1, r = x + 1;
  while (l <= r - 1) {
    cout << l << " " << r << " ";
    l++;
    r--;
  }
  if ((x + 1) % 2 == 1) {
    cout << l << " ";
  }
}
int main() {
  int n, k;
  cin >> n >> k;
  maxp(k);
  for (int i = k + 2; i <= n; i++) {
    cout << i << " ";
  }
  return 0;
}
