#include <bits/stdc++.h>
using namespace std;
const int INF = (1LL << 31) - 1;
const long long LINF = LLONG_MAX;
long long n, k, v = 1, e = 1, x = 1;
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n >> k;
  k = (k > n / 2 ? n - k : k);
  for (int i = 0; i < n; i++) {
    v += k;
    if (v - n > 1) {
      v -= n;
      x++;
      e += x;
      x++;
    } else
      e += x;
    cout << e << ' ';
  }
  cout << endl;
}
