{"problem":{"name":"Message from Aliens","description":{"content":"You are given a ciphertext $S$. It can be decrypted by the following procedure: *   Let $T$ be an empty string. *   For each $i = 1, 2, \\dots, |S|$ in this order, do the following: ($|S|$ denotes the","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"zone2021_d"},"statements":[{"statement_type":"Markdown","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.\n\n## Constraints\n\n*   $S$ consists of lowercase English letters and `R`.\n*   $1 ≤ |S| ≤ 5 \\times 10^5$\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$S$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"zone2021_d","tags":[],"sample_group":[["ozRnonnoe","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`."],["hellospaceRhellospace","The answer may be an empty string."]],"created_at":"2026-03-03 11:01:13"}}