#include <bits/stdc++.h>
#pragma comment(linker, "/stack:32000000")
using namespace std;
long long n, m, k, d, w;
int log2n(int x) {
  int res = 1;
  while ((1 << res) <= x) res++;
  return res - 1;
}
int main() {
  int n, k;
  cin >> n >> k;
  int i;
  int ma = n + 1, mi = 0;
  int last;
  for (i = 1; i <= k; i++) {
    if (i % 2 == 0) {
      cout << i / 2 << " ";
      mi = i / 2;
      last = mi;
    } else {
      cout << n - i / 2 << " ";
      ma = n - i / 2;
      last = ma;
    }
  }
  i--;
  if (i % 2 == 0) {
    for (int j = mi + 1; j < ma; j++) cout << j << " ";
  } else {
    for (int j = ma - 1; j > mi; j--) cout << j << " ";
  }
  return 0;
}
