#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T bigmod(T p, T e, T M) {
  long long int ret = 1;
  for (; e > 0; e >>= 1) {
    if (e & 1) ret = (ret * p) % M;
    p = (p * p) % M;
  }
  return (T)ret;
}
template <class T>
inline T gcd(T a, T b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
template <class T>
inline T modinverse(T a, T M) {
  return bigmod(a, M - 2, M);
}
template <class T>
inline T bpow(T p, T e) {
  long long int ret = 1;
  for (; e > 0; e >>= 1) {
    if (e & 1) ret = (ret * p);
    p = (p * p);
  }
  return (T)ret;
}
int toInt(string s) {
  int sm;
  stringstream ss(s);
  ss >> sm;
  return sm;
}
int toLlint(string s) {
  long long int sm;
  stringstream ss(s);
  ss >> sm;
  return sm;
}
const double eps = 1e-4;
int ts, kk = 1;
int n, m;
long long int tr[10000005];
void add(int i) {
  for (; i <= n; i += (i & -i)) tr[i]++;
}
long long int qry(int i) {
  long long int q = 0;
  for (; i > 0; i -= (i & -i)) q += tr[i];
  return q;
}
int main() {
  int t, i, j, k;
  long long int rs = 1;
  scanf("%d%d", &n, &m);
  m = min(n - m, m);
  int c1, c2;
  c1 = 1;
  for (k = 0; k < n; k++) {
    long long int q = 0;
    c2 = c1 + m;
    if (c2 > n) {
      q += qry(n) - qry(c1);
      c2 = c1 + m - n;
      q += qry(c2 - 1);
    } else {
      q += qry(c2 - 1) - qry(c1);
    }
    add(c1);
    add(c2);
    rs += q + 1;
    printf("%lld%c", rs, (k == n - 1) ? '\n' : ' ');
    c1 = c2;
  }
  return 0;
}
