#include <bits/stdc++.h>
using namespace std;
int flag[100009] = {};
int main() {
  int n, k, temp = 1, ans = 1, i = 0, t2 = 1;
  cin >> n >> k;
  while (k > 0) {
    cout << ans << ' ';
    flag[ans] = 1;
    if (i % 2 == 0)
      ans += k;
    else
      ans -= k;
    i++;
    k--;
  }
  for (i = 1; i <= n; i++)
    if (flag[i] == 0) cout << i << ' ';
  cout << endl;
  return 0;
}
