#include <bits/stdc++.h>
using namespace std;
int n, k;
long long ans = 1;
int c[1000048];
int LOWBIT(int x) { return x & (-x); }
int calc(int pos) {
  int ret = 0;
  int x = pos;
  while (x >= 1) {
    ret += c[x];
    x -= LOWBIT(x);
  }
  return ret;
}
int query(int left, int right) { return calc(right) - calc(left - 1); }
void update(int pos) {
  int x = pos;
  while (x <= n) {
    c[x]++;
    x += LOWBIT(x);
  }
}
int main() {
  int i, cur = 1, left, right, l1, r1, l2, r2;
  scanf("%d%d", &n, &k);
  if (k > n / 2) k = n - k;
  memset(c, 0, sizeof(c));
  for (i = 1; i <= n; i++) {
    left = cur;
    right = cur + k;
    if (right > n) right -= n;
    l1 = left - k + 1;
    r1 = left - 1;
    if (l1 < 1) l1 += n;
    if (r1 < 1) r1 += n;
    if (l1 <= r1)
      ans += query(l1, r1);
    else {
      ans += query(l1, n);
      ans += query(1, r1);
    }
    l2 = right - k + 1;
    r2 = right - 1;
    if (l2 < 1) l2 += n;
    if (r2 < 1) r2 += n;
    if (l2 <= r2)
      ans += query(l2, r2);
    else {
      ans += query(l2, n);
      ans += query(1, r2);
    }
    ans++;
    printf("%I64d ", ans);
    update(cur);
    cur = (cur + k - 1) % n + 1;
  }
  printf("\n");
  return 0;
}
