Code Submission Evaluation System Login

Datatähti Open 2018

Start:N/A
End:N/A
 

Tasks | Scoreboard | Statistics


CSES - Datatähti Open 2018 - StringCSES - String

String

Time limit:1.00 s
Memory limit:512 MB

You are given a string that contains each letter A–Z exactly once.

There are two possible operations: Your task is to find a sequence of operations after which the letters of the string are in increasing order.

Input

The only input line contains the string.

Output

First print an integer $k$: the number of operations. After this, print $k$ lines, each of which contains one of the operations SWAP and MOVE.

You can print any solution as long as $k \le 10^5$. There is always a solution.

Example

Input:
CBDEFGHIJKLMNOPQRSTUVWXYZA

Output:
2
SWAP
MOVE


Grading

You will get 100 points if your program solves all test cases; otherwise you will get 0 points.