#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
const long long N = 100001;
long long n, k, i = 1, j;
bool d = 1;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n >> k;
  for (; i < n - k; i++) {
    cout << i << " ";
  }
  j = n;
  while (j > i) cout << i++ << " " << j-- << " ";
  if (i == j) cout << j;
}
