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