#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long n, k;
  cin >> n >> k;
  vector<long long> v;
  v.push_back(1);
  long long co = 1, g = 0;
  for (long long i = k; i >= 1; i--) {
    co += pow(-1, g) * (i);
    g++;
    v.push_back(co);
  }
  k++;
  n -= (k);
  while (n--) {
    k++;
    v.push_back(k);
  }
  for (auto i : v) cout << i << " ";
}
