#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, k;
  cin >> n >> k;
  for (long long int i = n; i >= k + 1; i--) cout << i << " ";
  long long int nn = k + 1;
  for (long long int i = 0; i < ((long long int)(k / 2)); i++) {
    cout << i + 1 << " " << k - i << " ";
  }
  if (k % 2) cout << (k + 1) / 2;
  puts("");
  return 0;
}
