Sponsored
Use these hints if you're stuck. Try solving on your own first.
The depth of any character in the VPS is the ( number of left brackets before it ) - ( number of right brackets before it )
Solve with full IDE support and test cases