#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n, k;
  cin >> n >> k;
  k = min(k, n - k);
  long long ans = 1;
  long long cur = 0;
  long long curadd = 1;
  long long prev = 0, na = 0;
  vector<long long> ansv;
  for (long long(i) = 0; (i) < (n); ++(i)) {
    cur += k;
    if (cur > n) {
      ++curadd;
      prev = 1;
      na = 1;
      cur -= n;
    }
    if (prev && !na) {
      prev = 0;
      ++curadd;
    }
    na = 0;
    ans += curadd;
    ansv.push_back(ans);
  }
  for (long long(i) = 0; (i) < (n); ++(i)) {
    cout << ansv[i] << " ";
  }
}
int main() {
  ios::sync_with_stdio(false);
  solve();
  return 0;
}
