#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  int ct1 = 1, ct2 = n;
  for (int i = 0; i < k;) {
    cout << ct1++ << " ";
    i++;
    if (i == k) break;
    cout << ct2-- << " ";
    i++;
  }
  if (k % 2)
    for (; ct1 <= ct2; ct1++) cout << ct1 << " ";
  else
    for (; ct2 >= ct1; ct2--) cout << ct2 << " ";
}
