Problem B: Counting-out game

Problem B: Counting-out game

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 1122  Solved: 302
[Submit][Status][Web Board]

Description

Given a group of n students arranged in a line under the edict that


while(line has student)

    len=length of line

    for(i=1; i<=len; i+=m

          the i-th student will be executed going out the line 


please find the going-out order of student.


Input

Two numbers n ,m (1<m<=10,m<=n<2e6)

Output

The going-out order of students

Sample Input

5 2

Sample Output

1 3 5 2 4

HINT




[Submit][Status]