#P336. 【例57.3】火星人

【例57.3】火星人

Explanation

Humanity finally landed on the land of Mars and met the mysterious Martians. Both humans and Martians cannot understand each other's language, but our scientists have invented a method of communication using numbers. This communication method goes like this: first, the Martians tell a very large number to human scientists. After the scientists decipher the meaning of this number, they add a very small number to the large number and tell the Martians the result as a response from humans.

Martians use a very simple way to represent numbers - by breaking their fingers. Martians only have one hand, but this hand has thousands of fingers arranged in a row, numbered as 11 , 22 , 33 . Any two fingers of a Martian can switch positions freely, and they count using this method.

A Martian demonstrated how to count with fingers using a human hand. If five fingers - thumb, index finger, middle finger, ring finger, and little finger - are numbered as 11 , 22 , 33 , 44 , and 55 respectively, when they are arranged in normal order, they form a 55 digit of 1234512345 . When you swap the positions of the ring finger and little finger, a 55 digit of 1235412354 is formed.When you completely reverse the order of the five fingers, 5432154321 will be formed. Among all the 120120 digits that can be formed, 1234512345 is the smallest, representing 11 ; 1235412354 is the second smallest, which represents 22 ;5432154321 is the maximum, which represents 120120 . The following table shows the 66 digits that can be formed with only 33 fingers and the numbers they represent:

The three in one system number 12313221323211231322132321 represents the number 123456123456

Now you are fortunate to be the first Earthling to communicate with a Martian. A Martian will show you his fingers, and scientists will tell you the very small numbers to add. Your task is to add the numbers represented by Martian fingers to the numbers told to you by scientists, and change the order of Martian fingers based on the addition result. Input data to ensure that the result does not exceed the range that Martian fingers can represent.

Input format

Three lines, the first line has a positive integer NN , representing the number of Martian fingers (1N100001 ≤ N ≤ 10000 ). The second line is a positive integer MM , representing the small integer to be added (1M1001 ≤ M ≤ 100 ). The next line is an arrangement of N integers from 11 to NN , separated by spaces, representing the order in which Martian fingers are arranged.

Output format

There is only one line, which contains NN integers representing the changed arrangement order of Martian fingers. Separate every two adjacent numbers with a space in between, without any extra spaces.

Example

5
3
1 2 3 4 5
1 2 4 5 3