#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, i, j;
  while (cin >> n >> k) {
    for (i = 1; i < (n - k); i++) printf("%d ", i);
    i = n - k;
    j = n;
    while (j > i) cout << i++ << " " << j-- << " ";
    if (i == j) cout << i;
    cout << endl;
  }
  return 0;
}
