#include <bits/stdc++.h>
using namespace std;
using namespace std;
int h[100001];
int main() {
  int n, k;
  cin >> n >> k;
  int l = 1, r = k + 1;
  bool flag = 1;
  for (int i = 0; i < k; i++) {
    if (flag)
      cout << l << " ", h[l] = 1, l++;
    else
      cout << r << " ", h[r] = 1, r--;
    flag = !flag;
  }
  for (int i = 1; i <= n; i++) {
    if (h[i]) continue;
    cout << i << " ";
  }
  return 0;
}
