#include <bits/stdc++.h>
using namespace std;
int main() {
  int ytui, adsf, aargs, sadgs;
  int na, k;
  cin >> na >> k;
  int a[10000];
  if ((k + 1) % 2 != 1) {
    int s = (k + 1) / 2;
    int r = 1;
    cout << s;
    while (r != s) {
      cout << " " << s + r << " " << s - r;
      r++;
    }
    cout << " " << k + 1;
  } else {
    int s = (k + 1) / 2 + 1;
    int r = 1;
    cout << s;
    while (r != s) {
      cout << " " << s - r << " " << s + r;
      r++;
    }
  }
  for (int i = k + 2; i <= na; i++) cout << " " << i;
  return 0;
}
