#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 1000000;
int n, width;
long long dat[MAX_N * 4];
void init() {
  width = 1;
  while (width < n) width *= 2;
  for (int i = 0; i < 2 * width - 1; ++i) dat[i] = 0;
}
void update(int i, int x) {
  i += width - 1;
  dat[i] += x;
  while (i > 0) {
    i = (i - 1) / 2;
    dat[i] = dat[i * 2 + 1] + dat[i * 2 + 2];
  }
}
long long query(int a, int b, int k, int l, int r) {
  if (r <= a || b <= l) return 0;
  if (a <= l && r <= b) return dat[k];
  long long vl = query(a, b, k * 2 + 1, l, (l + r) / 2);
  long long vr = query(a, b, k * 2 + 2, (l + r) / 2, r);
  return vl + vr;
}
int main() {
  int k;
  cin >> n >> k;
  if (k > n / 2) k = n - k;
  init();
  int l = 0;
  long long s = 1;
  for (int i = 0; i < n; ++i) {
    int r = (l + k) % n;
    if (l < r) {
      s += query(l + 1, r, 0, 0, width) + 1;
    } else {
      s += query(l + 1, n, 0, 0, width) + query(0, r, 0, 0, width) + 1;
    }
    cout << s << " ";
    update(l, 1);
    update(r, 1);
    l = r;
  }
  cout << endl;
  return 0;
}
