IntermediateRating 1300
Counting Out
n people stand in a circle numbered 1..n. Starting from person 1, every k-th person is removed. Print the order of removal.
Input
n k (n ≤ 1000).
Output
One line.
Sample 1
Input
7 3
Output
3 6 2 7 5 1 4
Sample 2
Input
1 1
Output
1
Output appears here