#include <bits/stdc++.h>
using namespace std;
int a[5], b, ans, k, n;
int mod = 1000000007;
int main() {
  cin >> n >> k;
  for (int i = 1; i <= k / 2; i++) cout << i << " " << n - i + 1 << " ";
  if (k % 2 == 1) cout << k / 2 + 1 << " ";
  if (k % 2 == 0)
    for (int i = n - k / 2; i > k / 2; i--) cout << i << " ";
  else
    for (int i = k / 2 + 1 + 1; i < n - k / 2 + 1; i++) cout << i << " ";
  return 0;
}
