#include <bits/stdc++.h>
using namespace std;
int n, k;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> k;
  int a = 1, b = 1 + k;
  while (a < b) {
    cout << a << " " << b << " ";
    a++;
    b--;
  }
  if (a == b) cout << a << " ";
  for (int i = k + 2; i <= n; i++) cout << i << " ";
  return 0;
}
