L. Lift Problem
time limit per test
0.5 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

One day, Leo enters a desolate building that has exactly $$$10N$$$ floors and $$$N$$$ lifts numbered from $$$1$$$ to $$$N$$$.

In the building, the $$$N$$$ lifts are assigned to particular floors so that the time spent waiting for a lift on every floor is shortened. More specifically, there are $$$N$$$ evenly separated waiting floors for the lifts to stay on, the $$$i$$$-th of which is floor $$$10i-5$$$. When the lifts are not moving, they always stay on one of the waiting floors. Also, no lifts share the same waiting floor. Initially, lift $$$i$$$ is on the $$$i$$$-th waiting floor.

By taking the lifts, Leo can only move between floor $$$x$$$ to floor $$$y$$$, where both $$$x$$$ and $$$y$$$ are not waiting floors. Each time he wants to move from floor $$$x$$$ to floor $$$y$$$, the lift on the closest waiting floor will go to floor $$$x$$$. In the case of ties, the lift on the lower floor will go there. Then, the lift will take him to floor $$$y$$$. After the lift reaches floor $$$y$$$, every lift will immediately return to one of the waiting floors according to its current position. More precisely, a lift on a lower floor will move to a lower waiting floor.

Currently, Leo is on floor $$$F$$$ (It is guaranteed that $$$F$$$ is not a waiting floor). When he is walking around floor $$$F$$$, he suddenly comes up with a permutation $$$P$$$ with $$$N$$$ distinct integers from $$$1$$$ to $$$N$$$. Therefore, he decides to shuffle the lifts into the permutation $$$P$$$ so that lift $$$P_i$$$ is on the $$$i$$$-th waiting floor. As there are no escalators and stairs in the building, he can only shuffle the lifts by taking the lifts to move between floors.

As Leo needs to leave the building after an hour, he needs to shuffle the lifts into the permutation $$$P$$$ within $$$5N$$$ lift rides. Leo thinks it is too difficult and calls for your help. Can you teach Leo how he should move to complete it?

Note that you are not required to minimize the number of lift rides Leo takes.

Input

The first line contains two integers, $$$N$$$ and $$$F$$$, the number of lifts in the building and the floor Leo currently on respectively. ($$$3 \leq N \leq 200$$$, $$$1 \leq F \leq 10N$$$)

The second line contains a permutation $$$P$$$ of $$$N$$$ integers, the $$$i$$$-th integer denotes the number of the lift on the $$$i$$$-th waiting floor after the moves.

It is guaranteed that $$$F$$$ is not a waiting floor.

Output

On the first line, output one integer $$$K$$$ ($$$0 \leq K \leq 5N$$$), the number of lift rides Leo takes.

On the second line, output $$$K$$$ integers, the $$$i$$$-th of which represents the floor Leo moves to in the $$$i$$$-th move.

It can be proven that it is always possible to do so. If there are multiple answers, you can output any of them.

Examples
Input
3 13
3 1 2
Output
2
23 2
Input
5 27
3 1 5 4 2
Output
7
2 13 24 48 37 26 38
Note

In the first sample test, Leo took two lift rides.

  1. Leo moved from floor $$$13$$$ to floor $$$23$$$ by taking lift $$$2$$$. After the lift had reached floor $$$23$$$, it returned to the $$$2$$$-nd waiting floor, while the other two lifts remained on their initial waiting floor.
  2. Leo moved from floor $$$23$$$ to floor $$$2$$$ by taking lift $$$3$$$. After the lift had reached floor $$$2$$$, it moved to the $$$1$$$-st waiting floor, while lift $$$1$$$ and lift $$$2$$$ moved to the $$$2$$$-nd and $$$3$$$-rd waiting floor respectively.