#include <bits/stdc++.h>
using namespace std;
int k, n, tmp;
vector<int> a;
int main() {
  cin >> n >> k;
  tmp = n - k;
  for (int i = 1; i <= n - k; i++) cout << i << " ";
  for (int j = 0, i = k; i >= 1; i--, j++) {
    if (j & 1)
      cout << tmp - i << " ", tmp = tmp - i;
    else
      cout << tmp + i << " ", tmp = tmp + i;
  }
  return 0;
}
