Sponsored
Use these hints if you're stuck. Try solving on your own first.
The constraints are small. Construct the string by simulating the operations.
Solve with full IDE support and test cases