#include <bits/stdc++.h>
using namespace std;
int main() {
  unsigned long long i = 1, j = 1, n, k, c = 0;
  cin >> n >> k;
  cout << i << " " << i + k << " ";
  if (n == 1) {
    cout << 1;
    return 0;
  }
  while (1) {
    if (i + j < i + k - j)
      cout << i + j << " " << i + k - j << " ";
    else if (i + j == i + k - j) {
      cout << i + j << " ";
      break;
    } else
      break;
    c++;
    j++;
  }
  j = 2;
  while (k + j <= n && c < n) {
    cout << k + j << " ";
    j++;
  }
  return 0;
}
