Олимпиадный тренинг

Задача 39396. Distribution of gifts


Задача

Темы: Очередь
Gromozeka handed out N to earthly children standing in a circle, brought gifts. In order not to offend anyone, Gromozeka decided that every time he would give a gift to the K-th child. The child who received the gift happily ran out of the circle, and everyone else closed the circle. 
Decide in what order the children received the gifts.

Input
The input string contains numbers N ( 1 <= N <= 10000 ) and K ( 1 <= K <= 10000 ), separated by spaces.

Imprint
The program should display in one line, separated by a space, the numbers of the guys in the order in which they receive the gift.
 
Examples
# Input Output
1 5 3 3 1 5 2 4