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