#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n, k;
  cin >> n >> k;
  for (long long i = 1, j = k + 1, t = 0; i <= j; t ^= 1) {
    if (t == 0)
      cout << (i++) << " ";
    else
      cout << (j--) << " ";
  }
  for (long long i = k + 2; i <= n; i++) cout << i << " ";
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long T = 1;
  while (T--) {
    solve();
  }
  return 0;
}
