Investigation
"Chelix" studies at BSUIR, where he was given an assignment to do a laboratory work on the academic subject "physics". He was too lazy to do this work himself, so he decided to borrow it from his classmates. While checking this paper, the teacher suspected something wrong and decided to call in an investigator. The investigator decided to take the case. He was given a lab paper of size . It was broken down into suspicious rectangles. To verify that this work has been written off, the investigator must get the original work from the original work to the one given to him by the instructor. To do this, he can use his two tricks:
Cut the current rectangle horizontally or vertically between any two integer row or column numbers, respectively.
Transition to a rectangle with a different number.
But the investigator realized that this task is very difficult for him, and he decided to ask for your help.
In order for you to do it, he explained how to number the rectangles:
Initially you have a rectangle of size with the number .
If you cut the rectangle horizontally, the top rectangle keeps the old rectangle number, and the bottom rectangle is assigned the minimum unoccupied number .
If you decide to cut it vertically, the left new rectangle gets the number of the old rectangle, and the right rectangle gets minimum unoccupied number .
The lab work should be cut according to the plan that the investigator has designed especially for you, namely, he has given you a table of rows and columns, the same pair of numbers in which means that those two cells should be placed in the same rectangle after all the cuts, and there should be no cells with different numbers in that rectangle.
The techniques to be performed must be written down in a specific format:
To move to another rectangle, write down: "MOVE ", where is the number of the rectangle to move to.
For a cut, write: "SPLIT ", where is the character "H" (horizontal cut) or "V" (vertical cut), and is the number of the column (or row) after which to make the cut (note that the column (row) number is calculated relative to the current rectangle, not the original rectangle).
To make the investigation not very long, the investigator has asked you to tackle it in moves.
Input
In the first line you are given the numbers and — the number of rows and columns, respectively.
The next rows each contain numbers — plan that the investigator developed.
Output
In the first line print one integer — the number of receptions you have performed.
On the next lines, print the descriptions of techniques according to the format described above.
The answer is guaranteed to exist.