#include <bits/stdc++.h>
using namespace std;
int n, k, i, l, r, ans, a[100001];
bool w[100001];
int main() {
  scanf("%d%d", &n, &k);
  for (i = 1; i <= n; i++) a[i] = i;
  i = 1;
  l = i;
  r = i + k;
  while (l < r) {
    cout << a[l] << ' ' << a[r] << ' ';
    w[l] = true;
    w[r] = true;
    l++;
    r--;
  }
  for (i = 1; i <= n; i++)
    if (!w[i]) cout << a[i] << ' ';
  return 0;
}
