#include <bits/stdc++.h>
int find(double a[], int l, double b) {
  int c = 0;
  for (int i = 1; i <= l; i++)
    if (a[i - 1] == b) c++;
  return c;
}
using namespace std;
int main() {
  int a, b, c = 1, q = 1;
  cin >> a >> b;
  cout << q << ' ';
  for (int i = b; i >= 1; i--) {
    if (c) {
      q += i;
      cout << q << ' ';
    } else {
      q -= i;
      cout << q << ' ';
    }
    c = !c;
  }
  for (int y = b + 2; y <= a; y++) cout << y << ' ';
  return 0;
}
