#include <bits/stdc++.h>
using namespace std;
long long n, k, i, p, t, a[100000];
int main() {
  cin >> n >> k;
  if (k == 1) {
    for (i = 1; i <= n; i++) cout << i << " ";
    return 0;
  }
  for (i = 1; i < k; i++) {
    t++;
    a[t] = i;
    if (t - 1 == k - 1) break;
    t++;
    a[t] = n - i + 1;
    if (t - 1 == k - 1) break;
  }
  int p1, p2;
  p1 = a[t - 1];
  p2 = a[t];
  for (i = 1; i <= t; i++) cout << a[i] << " ";
  if (p2 > p1) {
    for (i = p2 - 1; i > p1; i--) cout << i << " ";
  };
  if (p1 > p2) {
    for (i = p2 + 1; i < p1; i++) cout << i << " ";
  }
  return 0;
}
