#include <bits/stdc++.h>
using namespace std;
const int maxn = 100005;
int n, m;
int main() {
  while (scanf("%d%d", &n, &m) != EOF) {
    printf("1 ");
    int flag = 0;
    for (int i = m, idx = 1; i >= 1; i--) {
      if (flag == 0)
        idx += i;
      else
        idx -= i;
      flag = 1 - flag;
      printf("%d ", idx);
    }
    for (int i = m + 2; i <= n; i++) {
      printf("%d ", i);
    }
  }
  return 0;
}
