#include <bits/stdc++.h>
using namespace std;
int n, k;
bool vis[100005];
int main() {
  cin >> n >> k;
  int cnt1 = 0;
  int cnt2 = 0;
  for (int i = 1; i <= k + 1; i++) {
    if (i % 2 == 1) {
      cout << i - cnt1 << " ";
      cnt1++;
    } else {
      cout << k + 1 - cnt2 << " ";
      cnt2++;
    }
  }
  for (int i = k + 2; i <= n; i++) {
    cout << i << " ";
  }
  cout << endl;
  return 0;
}
