#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, k, l, r;
  cin >> n >> k;
  l = 1;
  r = k + 1;
  while (l < r) {
    cout << l << " " << r << " ";
    l++;
    r--;
  }
  if (l == r) cout << l << " ";
  for (int i = k + 2; i <= n; i++) cout << i << " ";
  cout << "\n";
  return 0;
}
