def decodeString(self, s: str) -> str:
        St = []
        num = 0
        curr = ''
        for c in s:
            if c.isdigit():
                num = num*10 + int(c)
            elif c == '[':
                St.append([num, curr])
                num = 0
                curr = ''
            elif c == ']':
                count, prev = St.pop()
                curr = prev + count*curr
            else:
                curr += c
        return curr