#include <bits/stdc++.h>
using namespace std;
long long power(long long x, long long y) {
  if (y == 0) return 1ll;
  if (y % 2)
    return (x % 1000000007 * power(x, y - 1) % 1000000007) % 1000000007;
  else
    return power((x * x) % 1000000007, y / 2) % 1000000007;
}
vector<long long> t(4000005, 0), lazy(4000005, 0);
void push(long long v) {
  t[v * 2] += lazy[v];
  lazy[v * 2] += lazy[v];
  t[v * 2 + 1] += lazy[v];
  lazy[v * 2 + 1] += lazy[v];
  lazy[v] = 0;
}
void update(long long v, long long tl, long long tr, long long l, long long r,
            long long addend) {
  if (l > r) return;
  if (l == tl && tr == r) {
    t[v] += addend;
    lazy[v] += addend;
  } else {
    push(v);
    long long tm = (tl + tr) / 2;
    update(v * 2, tl, tm, l, min(r, tm), addend);
    update(v * 2 + 1, tm + 1, tr, max(l, tm + 1), r, addend);
    t[v] = t[v * 2] + t[v * 2 + 1];
  }
}
long long query(long long v, long long tl, long long tr, long long l,
                long long r) {
  if (l > r) return 0;
  if (l <= tl && tr <= r) return t[v];
  push(v);
  long long tm = (tl + tr) / 2;
  return query(v * 2, tl, tm, l, min(r, tm)) +
         query(v * 2 + 1, tm + 1, tr, max(l, tm + 1), r);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, k;
  cin >> n >> k;
  k = min(k, n - k);
  long long cnt[2 * n + 1];
  for (long long i = 0; i <= 2 * n; i++) cnt[i] = 0;
  long long curr = 1;
  long long st = 1;
  for (long long i = 1; i <= n; i++) {
    long long end = st + k;
    if (st + k > n) end = end - n;
    curr += (query(1, 1, n, st, st));
    curr += (query(1, 1, n, end, end));
    curr++;
    cout << curr << " ";
    if (st + 1 <= n && end - 1 <= n && st + 1 <= end - 1) {
      update(1, 1, n, st + 1, end - 1, 1);
    } else {
      update(1, 1, n, st + 1, n, 1);
      update(1, 1, n, 1, end - 1, 1);
    }
    st = end;
  }
}
