#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  for (int i = n; i >= k + 1; i--) cout << i << ' ';
  int sg = -1, num = k + 1;
  for (int i = k; i > 0; i--) {
    num += sg * i;
    cout << num << ' ';
    sg *= -1;
  }
  cout << endl;
  return 0;
}
