Narnal is a huge fan of vim, so he has created a text editor
called Vinux, which can only edit one line with several operations. Each line
has an invisible undeletable tail character called EOL (end of line), which
will always stay at the end of the line in any circumstance. Notice that the undeletable property of EOL means that EOL will
revive immediately at the end of the line whenever it vanishes (been replaced
or deleted). He wants to covert a one-line keyboard input containing
operations and digits into a one-line real
input with only digits.
Only the following operations are available:
r: next single input would replace the current character;
I: move the character pointer to the head of the line;
H: left shift the current character pointer unless it is at the
leftmost place;
L: right shift the current character pointer unless it is at the
rightmost place;
x: delete the current character;
Otherwise, each input would insert before the current character.