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