#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
int main() {
  int n, k;
  cin >> n >> k;
  k = min(k, n - k);
  long long int v = 0;
  long long int second = 1;
  long long int c = 1;
  for (int i = 0; i < n; i++) {
    v += k;
    second += c;
    if (v > n) {
      second++;
      v -= n;
      c += 2;
    }
    cout << second << " ";
  }
  return 0;
}
