#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(true);
  int n, k;
  cin >> n >> k;
  int a = 1, b = n;
  bool d = false;
  for (int i = 0; i < n; i++) {
    if (i < k) {
      if (d)
        cout << b--;
      else
        cout << a++;
      d = !d;
    } else if (d)
      cout << a++;
    else
      cout << b--;
    cout << " ";
  }
  cout << "\n";
  return 0;
}
