#include <bits/stdc++.h>
using namespace std;
int aib[1000010], n;
void aib_update(int i, int s) {
  for (; i <= n; i += i & (-i)) aib[i] += s;
}
int aib_query(int i) {
  int s = 0;
  for (; i >= 1; i -= i & (-i)) s += aib[i];
  return s;
}
int main() {
  int k;
  scanf("%d%d", &n, &k);
  k = min(k, n - k);
  long long sol = 1;
  for (int i = 1, x = 1; i <= n; i++) {
    int y = x + k;
    if (y > n) y -= n;
    if (x < y)
      sol += aib_query(y - 1) - aib_query(x);
    else
      sol += aib_query(n) - aib_query(x) + aib_query(y - 1);
    sol++;
    printf("%I64d ", sol);
    aib_update(x, 1);
    aib_update(y, 1);
    x = y;
  }
  return 0;
}
