You own a Goal Parser that can interpret a string command.
The command consists of: 'G', '()', '(al)'.
- 'G' → interpreted as the string 'G'
- '()' → interpreted as the string 'o'
- '(al)' → interpreted as the string 'al'
Return the Goal Parser's interpretation of the command string.
Input: A string command consisting only of 'G', '()', and '(al)'.
Output: A string — the interpreted result.
Input: G()(al)
Output: Goal
Explanation: G→G, ()→o, (al)→al → 'Goal'.Input: G()()
Output: Goo
Explanation: G→G, ()→o, ()→o → 'Goo'.Input: (al)G(al)()
Output: alGalo
Explanation: (al)→al, G→G, (al)→al, ()→o → 'alGalo'.1 <= command.length <= 100command consists of 'G','()','(al)' only