#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1E5 + 10;
int n, k, a[MAXN];
int main() {
  scanf("%d%d", &n, &k);
  int nowL = 1, nowR = k + 1, tot = 0;
  while (nowL < nowR) a[++tot] = nowR--, a[++tot] = nowL++;
  if (nowL == nowR) a[++tot] = nowL;
  for (int i = k + 2; i <= n; i++) a[++tot] = i;
  reverse(a + 1, a + k + 2);
  for (int i = 1; i <= n; i++) printf("%d%c", a[i], "\n "[i != n]);
}
