An inventory system compresses repeated label sequences with a compact code. The code consists of lowercase English letters, digits, [, and ], with no spaces. A run of one or more digits immediately followed by [ and a matching ] means: repeat everything between that [ and its matching ] that many times. The bracketed content may itself contain further such repeat-codes (nesting), and may also contain plain letters interspersed with them.
For example, 3[ab] decodes to ababab, and 2[a3[b]] decodes to abbbabbb (the inner 3[b] becomes bbb, giving a + bbb = abbb, repeated twice).
It is guaranteed that the code is well-formed (every [ has a matching ], every count is a positive integer with no leading zero, and there are no digits except immediately before a [), and that the fully decoded string never exceeds 1000 characters.
Input format
Line 1: the encoded string.
Output format
A single line: the fully decoded string.
Constraints
- 1 ≤ length of the encoded string ≤ 200
- Each repeat count is between 1 and 100.
- The fully decoded string has length between 1 and 1000.