#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100000;
int n, k;
long long A[MAXN];
int main() {
  cin >> n >> k;
  int l = 1, r = n;
  for (int i = 0; i < k; ++i) {
    if (i & 1) {
      cout << l++ << " ";
    } else {
      cout << r-- << " ";
    }
  }
  for (int i = k; i < n; ++i) {
    if ((k & 1) == 0) {
      cout << l++ << " ";
    } else {
      cout << r-- << " ";
    }
  }
}
