TT had passed the first challenge, now she faced the second one. This time Mr.Cai gave TT some number, and some commands: X dir Y, dir include L and R, if L means put Y left X, if R, put Y right X.
TT played the woman to Mr.Cai, so Mr.Cai had to lower the difficulty, he said all numbers would not repeat more than twice, that means you can find the only position X.
For each case, output the final array in a single line.