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