#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T abS(T a) {
  return ((a >= 0) ? a : -a);
}
template <class T>
inline T maX(T a, T b) {
  return ((a > b) ? a : b);
}
template <class T>
inline T miN(T a, T b) {
  return ((a < b) ? a : b);
}
template <class T>
inline void updmin(T &a, T b) {
  if (b < a) a = b;
}
template <class T>
inline void updmax(T &a, T b) {
  if (b > a) a = b;
}
int main() {
  int n, k;
  bool visited[100005] = {0};
  cin >> n >> k;
  int i = 1;
  while (1) {
    if (k + 2 - i <= i) break;
    cout << i << " " << k + 2 - i << " ";
    visited[i] = visited[k + 2 - i] = 1;
    i++;
  }
  for (int j = 1; j <= n; j++)
    if (!visited[j]) cout << j << " ";
  return 0;
}
