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