#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
const int inf = 2147483647;
long long n, k;
long long N;
long long d[2010101];
long long t[2010101];
long long sum(long long x) {
  long long r = 0;
  while (x) {
    r += t[x];
    x -= (x & -x);
  }
  return r;
}
void update(long long id, long long k) {
  while (id <= N) {
    t[id] += k;
    id += (id & -id);
  }
}
long long g(long long x) {
  while (x <= 0) x += n;
  while (x > n) x -= n;
  return x;
}
long long f(long long s, long long e) {
  s = g(s);
  e = g(e);
  if (s < e) {
    return sum(e) - sum(s);
  }
  return sum(n) - sum(s) + sum(e);
}
int main() {
  scanf("%lld%lld", &n, &k);
  N = 1;
  while (N < n) N *= 2;
  long long x = 1;
  long long ans = 1;
  for (long long i = 0; i < n; i++) {
    long long c = 0;
    long long nx = x + k;
    if (k <= n / 2)
      c = f(x, nx - 1);
    else
      c = f(nx, x - 1);
    ans += c + 1;
    printf("%lld ", ans);
    update(x, 1);
    update(g(nx), 1);
    x = g(nx);
  }
}
