#t437. 围圈报数

围圈报数

Circle Counting

Problem Background

Special for beginners, ^_^

Problem Description

There are nn people standing in a circle. Counting starts from the 11st person; the mm-th person counted is removed from the circle, then counting restarts from the next person after the removed one, and the mm-th person counted is removed again, and so on, until all people have been removed. Let the nn people be numbered 1,2,…,n1,2,\dots,n. Print the order in which they are removed.

Input Format

nn and mm.

Output Format

The order of removal.

Sample Input 1

4 17

Sample Output 1

1 3 4 2

Constraints

n≤100n\le 100, m≤50m\le 50. Time limit 1s, memory limit 1024KiB for each test case.