------
## 最终结论
```python
def decodeString(s: str) -> str:
    stack = []
    current_num = 0
    current_string = ''
    
    for char in s:
        if char.isdigit():
            current_num = current_num * 10 + int(char)
        elif char == '[':
            stack.append((current_string, current_num))
            current_string, current_num = '', 0
        elif char == ']':
            last_string, num = stack.pop()
            current_string = last_string + num * current_string
        else:
            current_string += char
    
    return current_string

# Example usage:
s1 = "3[a]2[bc]"
s2 = "3[a2[c]]"
s3 = "2[abc]3[cd]ef"

print(decodeString(s1))  # Output: "aaabcbc"
print(decodeString(s2))  # Output: "accaccacc"
print(decodeString(s3))  # Output: "abcabccdcdcdef"
```