#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 15;
long long n, k;
long long a[N];
void init() { cin >> n >> k; }
void solve() {
  a[1] = 1;
  long long f = k + 1;
  long long op = k;
  for (int i = 2; i <= k + 1; i++) {
    if (i % 2 == 0) {
      a[i] = a[i - 1] + op;
      op--;
    } else {
      a[i] = a[i - 1] - op;
      op--;
    }
  }
  for (int i = k + 2; i <= n; i++) {
    a[i] = i;
  }
  for (int i = 1; i <= n; i++) cout << a[i] << " ";
  cout << endl;
}
int main() {
  init();
  solve();
  return 0;
}
