#include <bits/stdc++.h>
using namespace std;
string toString(long long num) {
  stringstream ss;
  ss << num;
  string str = ss.str();
  return str;
}
long long toLong(string str) {
  long long res;
  istringstream ss(str);
  ss >> res;
  return res;
}
int main() {
  long long n, k, current = 1, step = 1, cycle = 0, res = 1;
  cin >> n >> k;
  k = min(k, n - k);
  for (int i = 1; i <= n; i++) {
    current += k;
    step = cycle * 2 + 1;
    if (current > n) {
      current -= n;
      cycle++;
      step++;
    }
    res += step;
    if (i == n) res--;
    cout << res << endl;
  }
  return 0;
}
