def decodeString(self, s: str) -> str:
        i = 0
        def decode(s):
            nonlocal i
            result = []
            while i < len(s) and s[i] != ']':
                if s[i].isdigit():
                    num = 0
                    while i < len(s) and s[i].isdigit():
                        num = num*10 + int(s[i])
                        i += 1