#include <bits/stdc++.h>
using namespace std;
int arr[100005];
int hashmap[100005];
int main() {
  int n, k, i, j;
  cin >> n >> k;
  int p1 = 1;
  int p2 = n;
  for (i = 1; i <= k; i++) {
    if (i & 1) {
      cout << p1++ << " ";
    } else {
      cout << p2-- << " ";
    }
    if (i == n) cout << endl;
  }
  for (i = k + 1; i <= n; i++) {
    if ((k + 1) & 1) {
      cout << p2-- << " ";
    } else {
      cout << p1++ << " ";
    }
  }
}
