#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  int z = 0;
  vector<int> v;
  int i = 0;
  int u = 1 + k;
  for (i = 1; i <= u / 2; i++) {
    v.push_back(i);
    v.push_back(u - i + 1);
  }
  if (u % 2 == 1) v.push_back(i);
  for (int c = u + 1; c <= n; c++) v.push_back(c);
  for (const auto& el : v) {
    cout << el << " ";
  }
  return 0;
}
