#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 10;
int a[maxn], n, k;
int sum(int x) {
  int res = 0;
  while (x > 0) {
    res += a[x];
    x -= x & -x;
  }
  return res;
}
void add(int x) {
  while (x <= n) {
    a[x] += 1;
    x += x & -x;
  }
}
int main() {
  while (scanf("%d%d", &n, &k) != EOF) {
    long long ans = 1;
    int s = 1, e;
    memset(a, 0, sizeof(a));
    if (k > (n / 2)) k = n - k;
    for (int i = 0; i < n; ++i) {
      e = (s + k) % n;
      if (e == 0) e = n;
      if (s < e)
        ans += sum(e - 1) - sum(s) + 1;
      else
        ans += sum(n) - sum(s) + sum(e - 1) + 1;
      if (i != n - 1)
        printf("%lld ", ans);
      else
        printf("%lld\n", ans);
      add(s);
      add(e);
      s = e;
    }
  }
  return 0;
}
