#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  int n, k;
  cin >> n >> k;
  int c = 1;
  cout << c << " ";
  int f = 1;
  for (int i = k; i > 0; i--) {
    c += f * i;
    cout << c << " ";
    f *= -1;
  }
  for (int i = 2 + k; i <= n; i++) cout << i << " ";
  cout << endl;
  return 0;
}
