#include <bits/stdc++.h>
using namespace std;
long long n, m, x, y, q = 2, c, k;
long long a[100002];
int main() {
  cin >> n;
  cin >> m;
  c = min(n, m + 1);
  for (k = 1; k <= c / 2; k++) {
    cout << k << " " << c - k + 1 << " ";
  }
  if (c % 2 == 1) {
    cout << c / 2 + 1 << " ";
  }
  for (k = c; k <= n - 1; k++) {
    cout << k + 1 << " ";
  }
}
