#include using namespace std; int main() { int n, k; cin >> n >> k; bool former = ((n - 1) % (k + 1) != 0); int x = 0; if (!former) { cout << 0 << endl; cin >> x; } while (x < n) { x += (n - 1 - x) % (k + 1); cout << x << endl; cin >> x; } return 0; }