a valid parenthesis stre a a B A b valid parenthesis string represent stre concatenationfor example valid parenthesis stringsa valid parenthesis stre s primitive nonempty exist way split s a B a b nonempty valid parenthesis stringsgiven valid parenthesis string s consider primitive decomposition s p1 P2 Pk Pi primitive valid parenthese stringsReturn s remove outermost parenthese primitive string primitive decomposition s Example 1input s Output Explanation the input string primitive decomposition after remove outer parenthesis Example 2input s Output Explanation the input string primitive decomposition after remove outer parenthesis Example 3input s Output Explanation the input string primitive decomposition after remove outer parenthesis Constraints1 slength 105si s valid parenthesis string