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