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