Parse a command string where G stays G, () becomes o and (al) becomes al. Return the interpreted string.
G
()
o
(al)
al
command = "G()(al)"
"Goal"
command = "G()()()()(al)"
"Gooooal"
1 <= command.length <= 100 `command` only contains `G`, `()` and `(al)`.
Topics
Implement interpret in the editor and return the answer — printing it is never graded.
interpret
Problem 55 of 1146 in the arena