{"raw_statement":[{"iden":"problem statement","content":"You are given a ciphertext $S$. It can be decrypted by the following procedure:\n\n*   Let $T$ be an empty string.\n*   For each $i = 1, 2, \\dots, |S|$ in this order, do the following: ($|S|$ denotes the length of $S$)\n    *   if the $i$\\-th character of $S$ is `R`, reverse $T$;\n    *   if the $i$\\-th character of $S$ is not `R`, add that character to the end of $T$.\n*   After the operation above, if there are two consecutive same characters in $T$, remove those two characters. Repeat this operation as long as it can be done. (We can prove that the final string obtained does not depend on the order the characters are removed.)\n\nPrint the string $T$ obtained by this procedure."},{"iden":"constraints","content":"*   $S$ consists of lowercase English letters and `R`.\n*   $1 ≤ |S| ≤ 5 \\times 10^5$"},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$S$"},{"iden":"sample input 1","content":"ozRnonnoe"},{"iden":"sample output 1","content":"zone\n\nWe can decrypt it as follows:\n\n*   Initially, $T$ is an empty string.\n*   Add `o` at the end of $T$, making it `o`.\n*   Add `z` at the end of $T$, making it `oz`.\n*   Reverse $T$, making it `zo`.\n*   Add `n` at the end of $T$, making it `zon`.\n*   Add `o` at the end of $T$, making it `zono`.\n*   Add `n` at the end of $T$, making it `zonon`.\n*   Add `n` at the end of $T$, making it `zononn`.\n*   Add `o` at the end of $T$, making it `zononno`.\n*   Add `e` at the end of $T$, making it `zononnoe`.\n*   Delete two consecutive `n`s from $T$, making it `zonooe`.\n*   Delete two consecutive `o`s from $T$, making it `zone`."},{"iden":"sample input 2","content":"hellospaceRhellospace"},{"iden":"sample output 2","content":"The answer may be an empty string."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}