You are given a string command that consists of a sequence of tokens. A parser interprets the input string by applying the following mappings:
"G" is interpreted as "G"
"()" is interpreted as "o"
"(al)" is interpreted as "al"
Return the final interpreted string after translating all tokens in command.
Constraints:
command.length
command consists of "G", "()", and/or "(al)" in some order.
You are given a string command that consists of a sequence of tokens. A parser interprets the input string by applying the following mappings:
"G" is interpreted as "G"
"()" is interpreted as "o"
"(al)" is interpreted as "al"
Return the final interpreted string after translating all tokens in command.
Constraints:
command.length
command consists of "G", "()", and/or "(al)" in some order.