#include <bits/stdc++.h>
using namespace std;
int n, k, t, cur;
void solve() {
  scanf("%d %d", &n, &k);
  t = n - k;
  for (int i = 1; i <= t; i++) printf("%d ", i);
  for (int i = k, j = 1; i >= 1; i--, j *= -1) {
    t += i * j;
    printf("%d ", t);
  }
}
int main(void) {
  solve();
  return 0;
}
