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