#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  int arr[n];
  int j = 1;
  for (int i = 0; i <= k; i += 2) {
    arr[i] = j;
    arr[i + 1] = k - j + 2;
    j++;
  }
  for (int i = k + 1; i < n; i++) {
    arr[i] = i + 1;
  }
  for (int i = 0; i < n; i++) {
    cout << arr[i] << " ";
  }
  cout << endl;
}
