def decode_string(s):
stack = []; cur_num = <NUM_LIT:0>; cur_string = '<STR_LIT>'<EOL>for c in s:<EOL><INDENT>if c == '<STR_LIT:[>':<EOL><INDENT>stack.append((cur_string, cur_num))<EOL>cur_string = '<STR_LIT>'<EOL>cur_num = <NUM_LIT:0><EOL><DEDENT>elif c == '<STR_LIT:]>':<EOL><INDENT>prev_string, num = stack.pop()<EOL>cur_string = prev_string + num * cur_string<EOL><DEDENT>elif c.isdigit():<EOL><INDENT>cur_num = cur_num*<NUM_LIT:10> + int(c)<EOL><DEDENT>else:<EOL><INDENT>cur_string += c<EOL><DEDENT><DEDENT>return cur_string<EOL>
:type s: str
:rtype: str