Start

2018-03-17 02:00 AKDT

Beta 2018

End

2018-03-17 08:00 AKDT
The end is near!
Contest is over.
Not yet started.
Contest is starting in -1131 days 10:18:05

Time elapsed

6:00:00

Time remaining

0:00:00

Problem F
Keystrokes

Benni was browsing the internet and accidentally picked up a keylogger. Fortunately, Benni’s computer has virus protection which alerted him, but the protection did not remove the virus. Whenever Benni types a password on a web page, he tries to hide it so that the keylogger does not get his passwords. In order to obscure his password, enters it in a strange way. He uses the left and right arrow keys to move the cursor, and erases characters with backspace. If you are given the sequence of keystrokes that Benni used to enter his password, can you figure out what his password is?

Input

The input is one line containing a string of length $n$. Benni only writes lowercase letters and numbers, but when he uses the left arrow key, the right arrow key, or the backspace key, they are indicated by L, R, or B, respectively. Neither B nor L appear in the string if the cursor is in front of the first letter and R does not appear if the cursor is after the last letter.

Output

Print one line containing only Benni’s password.

Points

Group

Points

Input restrictions

$1$

$10$

$1 \leq n \leq 1\, 000\, 000$, neither L, R nor B are in the string

$2$

$13$

$1 \leq n \leq 1\, 000$

$3$

$17$

$1 \leq n \leq 1\, 000\, 000$, neither L nor R are in the string

$4$

$24$

$1 \leq n \leq 1\, 000\, 000$, B is not in the string

$5$

$36$

$1 \leq n \leq 1\, 000\, 000$

Sample Input 1 Sample Output 1
iLnLnLeLb
benni
Sample Input 2 Sample Output 2
arnarLLLBBun
unnar
Sample Input 3 Sample Output 3
password123
password123