#include <bits/stdc++.h>
using namespace std;
int MaxVal = 1000001;
long long int f[1000002];
long long int c[1000002];
long long int tree[1000002];
int read(int idx) {
  int sum = 0;
  while (idx > 0) {
    sum += tree[idx];
    idx -= (idx & -idx);
  }
  return sum;
}
void update(int idx, long long int val) {
  while (idx <= MaxVal) {
    tree[idx] += val;
    idx += (idx & -idx);
  }
}
int circular(int x, int n) {
  int a = x % n;
  if (a <= 0) a += n;
  return a;
}
int main() {
  for (int i = 0; i < 1000002; i++) {
    tree[i] = f[i] = c[i] = 0;
  }
  int n, k;
  cin >> n >> k;
  if (k > n / 2) k = n - k;
  int curr = 1;
  long long val = 1;
  for (int i = 1; i <= n; i++) {
    update(curr, 1);
    int next = (curr + k) % n;
    if (next == 0) next = n;
    update(next, 1);
    long long ans;
    if (curr < next) {
      ans = read(circular(next - 1, n));
      ans -= read(circular(curr, n));
    } else {
      ans = read(n) - read(circular(curr, n));
      if (next > 1) ans += read(circular(next - 1, n));
    }
    val += ans + 1;
    curr = next;
    cout << val << " ";
  }
  cout << "\n";
  return 0;
}
