The Last Eye#4396

The Last Eye

3 seconds
64 megabytes
Easy

After the great battle, which the indigenous people won against the conquistadors, the commanders of the indigenous army decided to hold a military parade in their capital. Columns of troops were to march before the line of commanders, showcasing their might and strength to all. Such a parade was intended to significantly boost the morale of the troops and prepare them for new battles.

The only obstacle to organizing the parade was that among all the commanders, only the Last Eye retained his sight. It was decided to form up all the commanders, after which the Last Eye would arrange the other commanders by height. However, according to the drill regulations, the Last Eye is limited in his actions: he can either swap places with his neighbor or swap his two neighbors with each other.

The Last Eye is worried that he may not cope with such a responsible task, since there will also be higher-ranking military officers in the line, so he has decided to entrust this task to you.

Input

The first line contains the numbers and — the number of commanders and the position of the Last Eye in the line, respectively (1 \leq K \leq N \leq 500). The next line contains the numbers a_i separated by spaces — the height in centimeters of the commander standing -th from left to right in the line (150 \leq a_i \leq 240).

Output

The output should contain the sequence of commands that the Last Eye needs to perform to arrange all the commanders in order of increasing height.

The following commands are possible for the Last Eye:

  1. left — swap with the neighbor on the left;

  2. right — swap with the neighbor on the right;

  3. swap — swap the two neighbors with each other.

Commands should be output one per line, with no spaces. The sequence of commands should end with the line sorted. If it is impossible to arrange the commanders by height in this way, output impossible.

Examples

Example 1

Loading
Loading