#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, num = 1;
  bool biao[100100] = {0}, kk = 1;
  scanf("%d%d", &a, &b);
  printf("1 ");
  while (b != 1) {
    if (kk) {
      printf("%d ", num + b);
      num = num + b;
      biao[num] = 1;
      b--;
      kk = 0;
    } else {
      printf("%d ", num - b);
      num = num - b;
      biao[num] = 1;
      b--;
      kk = 1;
    }
  }
  for (int i = 2; i <= a; i++)
    if (biao[i] == 0) printf("%d ", i);
}
