give string s contain type character return true s validthe following rule define valid stringany left parenthesis correspond right parenthesis any right parenthesis corresponding leave parenthesis left parenthesis correspond right parenthesis treat single right parenthesis single left parenthesis string Example 1input s output trueexample 2input s output trueExample 3input s output true constraints1 slength 100si