#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, i, pos = 0;
  long long rounds = 0, segments = 1;
  scanf("%d%d", &n, &k);
  if (k > n / 2) k -= n;
  for (i = 0; i < n; i++) {
    pos += k;
    if (pos >= n) pos -= n;
    if (pos <= -n) pos += n;
    if (k > 0) {
      if (pos < k)
        rounds++;
      else if (pos < 2 * k)
        rounds++;
    } else {
      if (pos > k)
        rounds++;
      else if (pos > 2 * k)
        rounds++;
    }
    if (pos == 0) rounds--;
    segments += rounds;
    if (i > 0) printf(" ");
    printf("%I64d", segments);
  }
  printf("\n");
  return 0;
}
