#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 now = k + 1;
  cout << now << " ";
  for (int i = 1; i < k + 1; i++)
    if (i % 2 == 0)
      cout << (now = now + k - (i - 1)) << " ";
    else
      cout << (now = now - (k - (i - 1))) << " ";
  cout << endl;
}
