Write a function that decompresses a string:
"a(bcd){3}e" -> "abcdbcdbcde"
"a(bc(d){4}e){3}f" -> "abcddddebcddddebcddddef"
This problem asks you to decompress strings with repeated grouped segments such as <code>(…){k}</code>, including nested groups. For example, <code>a(bc(d){4}e){3}f</code> requires expanding the inner repetition first, then repeating the outer block three times. A typical solution uses recursion or a stack to parse the string, build substrings for each group, and append repeated content back into the result. The key challenges are handling nested parentheses, parsing repeat counts, and assembling the final string correctly.