Nested run-length decoder
Your task
Decode a nested run-length encoded string. The encoding rule is k[encoded] where the bracketed substring is repeated k times; k is a positive integer (possibly multi-digit) and brackets may nest, e.g. '3[a2[bc]]' -> 'abcbcabcbcabcbc'. Plain letters appear as themselves. The input contains only lowercase letters, digits, and the brackets, and is guaranteed valid. Return the fully expanded string.
Examples
decode_string(s: str) -> strExample 1
Input
decode_string("3[a2[bc]]")Output
"abcbcabcbcabcbc"