#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int n, k;
  cin >> n >> k;
  int i = 1, j = n;
  int cnt = 0;
  vector<int> v;
  for (int p = 1; p <= n; p++) {
    if (p % 2 != 0) {
      cout << i << " ";
      i++;
      cnt++;
      if (cnt == k) {
        for (int q = i; q <= j; q++) cout << q << " ";
        break;
      }
    } else if (p % 2 == 0) {
      cout << j << " ";
      j--;
      cnt++;
      if (cnt == k) {
        for (int q = j; q >= i; q--) cout << q << " ";
        break;
      }
    }
  }
  return 0;
}
