Sponsored
Use these hints if you're stuck. Try solving on your own first.
You can try all combinations and keep mask of characters you have.
You can use DP.
Solve with full IDE support and test cases