#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, i, j;
  cin >> n >> k;
  if (k > n / 2) {
    k = n - k;
  }
  int st = 1;
  long long ans = 1;
  int num = (n - 1) / k;
  int n2 = num;
  while (n2--) {
    ans++;
    cout << ans << " ";
  }
  st = num * k + st;
  int rem = n + 1 - st;
  long long x = 2;
  while (rem > 0) {
    num = (n + rem) / k;
    st = st + num * k - n;
    rem = n + 1 - st;
    ans += x;
    cout << ans << " ";
    x++;
    int n2 = num - 1;
    while (n2--) {
      ans += x;
      cout << ans << " ";
    }
    x++;
  }
  return 0;
}
