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