code. The shorthand is glued together from three kinds of pieces, in any order:
- G stands for the letter G;
- () stands for the letter o;
- (al) stands for the two letters al.
Decode every piece and return the resulting string, keeping the pieces in their original order.code='(al)()G' → 'aloG'
(al) → al, () → o, G → G; together that is aloG.
code='G()()G(al)' → 'GooGal'
Each pair of empty brackets becomes an o: GooGal.
code='G' → 'G'
code is made up entirely of the pieces G, () and (al)code='(al)()G'
'aloG'
Run checks the first 3 tests in your browser. Submit checks all 84 tests on the server, hidden ones included.