#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e6 + 5;
int n, k, mk[MAX];
long long tree[MAX];
void upd(int x) {
  for (; x <= n; x += x & -x) tree[x]++;
}
long long query(int x) {
  if (x < 1) return 0;
  long long s = 0;
  for (; x > 0; x -= x & -x) s += tree[x];
  return s;
}
int main() {
  scanf("%d%d", &n, &k);
  k = min(k, n - k);
  int last = 1;
  long long sol = 1;
  for (int i = 1; i <= n; i++) {
    int nxt = (last - 1 + k) % n + 1;
    long long cnt = 0;
    if (last <= nxt)
      cnt = query(nxt - 1) - query(last);
    else
      cnt = query(n) - query(last) + query(nxt - 1);
    upd(last);
    upd(nxt);
    last = nxt;
    mk[last] = 1;
    sol += cnt + 1;
    printf("%lld ", sol);
  }
  printf("\n");
  return 0;
}
