#include <bits/stdc++.h>
const long long N = 1e6 + 5;
const long long mod = 1e9 + 7;
const double Phi = (sqrt(5) + 1) / 2;
const double PI = acos(-1.0);
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(NULL);
  ios_base::sync_with_stdio(0);
  cout.tie(NULL);
  int n, k;
  cin >> n >> k;
  vector<int> v;
  for (int i = 1; i <= k / 2; i++) {
    v.push_back(i);
    v.push_back(n - i + 1);
  }
  for (int i = n - k / 2; i > k / 2; i--) {
    v.push_back(i);
  }
  if (k % 2) {
    reverse(v.begin() + k - 1, v.end());
  }
  for (auto it : v) {
    cout << it << ' ';
  }
  cout << '\n';
  return 0;
}
